Jindřich Makovička 9822e3aa52 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>
(cherry picked from commit 1a8c6917f68f7378465e18f7615762bfd22704c2)

Conflicts:

	libavcodec/h264.c
2012-10-19 19:23:14 +02:00
2012-03-04 12:26:06 +01:00
2012-03-08 22:07:55 +01:00
2012-01-21 12:04:02 +02:00
2012-02-26 10:03:16 +01:00
2011-03-16 21:54:39 +01:00
2012-01-19 00:19:43 +01:00
2011-04-07 02:54:12 +02:00
2012-06-03 19:05:29 +02:00

Libav README
------------

1) Documentation
----------------

* Read the documentation in the doc/ directory.

2) Licensing
------------

* See the LICENSE file.
Description
No description provided
Readme 173 MiB
Languages
C 92.1%
Assembly 6%
Makefile 1.2%
C++ 0.3%
Objective-C 0.2%
Other 0.1%