diff options
author | Reinhard Nissl <rnissl@gmx.de> | 2007-04-09 12:55:07 +0000 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2007-04-09 12:55:07 +0000 |
commit | ff82e429cbf25599b857a6bb484145b372c115ba (patch) | |
tree | 056b3b30c1a3ea7a6ce6bbfd084f8cdd9b345810 /libavcodec/h264.c | |
parent | e4141433ead866d1b359c0cbf3e4d5180477206d (diff) | |
download | ffmpeg-streaming-ff82e429cbf25599b857a6bb484145b372c115ba.zip ffmpeg-streaming-ff82e429cbf25599b857a6bb484145b372c115ba.tar.gz |
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
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index e4e3234..6daa0f0 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -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); - if (ptr==NULL || dst_length <= 0){ + if (ptr==NULL || dst_length < 0){ return -1; } while(ptr[dst_length - 1] == 0 && dst_length > 1) |