mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
h264: support invalid annex B in mp4
Fixes Ticket1914 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
c2c1726847
commit
93b89868e1
@ -3763,6 +3763,13 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size)
|
||||
ff_h264_reset_sei(h);
|
||||
}
|
||||
|
||||
if (h->nal_length_size == 4) {
|
||||
if (buf_size > 8 && AV_RB32(buf) == 1 && AV_RB32(buf+5) > (unsigned)buf_size) {
|
||||
h->is_avc = 0;
|
||||
}else if(buf_size > 3 && AV_RB32(buf) > 1 && AV_RB32(buf) <= (unsigned)buf_size)
|
||||
h->is_avc = 1;
|
||||
}
|
||||
|
||||
for (; pass <= 1; pass++) {
|
||||
buf_index = 0;
|
||||
context_count = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user