mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
scenario: A properly coded frame is followed by an end of sequence NAL unit,
i.e. the four bytes 00 00 01 0a. When decode_nal() decodes the end of sequence NAL unit, it returns with dst_length == 0. The original code leads to a return -1 which discards the current properly decoded frame. patch by Reinhard Nissl, rnissl gmx de Originally committed as revision 8688 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
e4141433ea
commit
ff82e429cb
@ -8144,7 +8144,7 @@ static int decode_nal_units(H264Context *h, uint8_t *buf, int buf_size){
|
|||||||
}
|
}
|
||||||
|
|
||||||
ptr= decode_nal(h, buf + buf_index, &dst_length, &consumed, h->is_avc ? nalsize : buf_size - buf_index);
|
ptr= decode_nal(h, buf + buf_index, &dst_length, &consumed, h->is_avc ? nalsize : buf_size - buf_index);
|
||||||
if (ptr==NULL || dst_length <= 0){
|
if (ptr==NULL || dst_length < 0){
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
while(ptr[dst_length - 1] == 0 && dst_length > 1)
|
while(ptr[dst_length - 1] == 0 && dst_length > 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user