1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00
FFmpeg/libavcodec
Jindřich Makovička 1a8c6917f6 h264: avoid stuck buffer pointer in decode_nal_units
When decode_nal_units() previously encountered a NAL_END_SEQUENCE,
and there are some junk bytes left in the input buffer, but no start codes,
buf_index gets stuck 3 bytes before the end of the buffer.

This can trigger an infinite loop in the caller code, eg. in
try_decode_trame(), as avcodec_decode_video() then keeps returning zeroes,
with 3 bytes of the input packet still available.

With this change, the remaining bytes are skipped so the whole packet gets
consumed.

CC:libav-stable@libav.org

Signed-off-by: Jindřich Makovička <makovick@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-09-29 19:31:17 +02:00
..
2012-09-28 11:03:20 +02:00
2012-09-17 14:17:27 -04:00
2012-09-29 09:26:04 +02:00
2012-09-15 23:54:21 +01:00
2012-09-15 23:54:21 +01:00
2012-09-29 19:12:04 +02:00
2012-09-28 11:03:20 +02:00
2012-09-19 11:05:36 -07:00
2012-09-28 11:03:20 +02:00
2012-09-17 15:48:20 +02:00