diff options
author | Jindřich Makovička <[email protected]> | 2012-09-29 11:16:45 +0200 |
---|---|---|
committer | Anton Khirnov <[email protected]> | 2012-09-29 19:31:17 +0200 |
commit | 1a8c6917f68f7378465e18f7615762bfd22704c2 (patch) | |
tree | 95fefb1dcfc3c6b00157121c612e07d246e96fd2 /libavformat | |
parent | 0f583d20d5ddcab34d8af76a597d5d6f1f19fece (diff) |
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:[email protected]
Signed-off-by: Jindřich Makovička <[email protected]>
Signed-off-by: Anton Khirnov <[email protected]>
Diffstat (limited to 'libavformat')
0 files changed, 0 insertions, 0 deletions