Files
ffmpeg/libavcodec
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 1a8c6917f6)

Conflicts:

	libavcodec/h264.c
2012-10-19 19:23:14 +02:00
..
2011-12-02 17:40:40 -05:00
2011-11-25 13:19:54 +00:00
2011-11-25 13:19:54 +00:00
2011-12-02 17:40:40 -05:00
2011-11-02 17:21:45 -04:00
2011-11-02 17:21:45 -04:00
2011-11-02 17:21:45 -04:00
2011-11-25 13:19:54 +00:00
2011-11-25 13:19:54 +00:00
2011-09-29 16:54:00 -04:00
2011-09-13 10:59:47 -04:00
2012-01-03 16:28:17 -05:00
2011-12-02 17:40:40 -05:00
2012-01-11 08:56:24 -05:00
2011-10-10 21:36:12 +02:00
2012-04-29 22:07:03 +02:00
2011-12-02 17:40:40 -05:00
2012-01-01 22:27:04 +01:00
2012-01-10 09:29:22 -08:00
2012-10-14 16:03:24 -04:00
2011-12-05 13:06:58 +01:00
2011-12-18 23:52:53 +01:00
2012-01-03 15:25:51 +01:00
2012-03-08 22:07:55 +01:00
2011-12-11 00:32:25 +01:00
2011-12-10 11:58:03 +01:00
2011-10-10 21:36:13 +02:00
2011-12-05 13:06:58 +01:00
2012-03-14 21:09:19 +01:00
2012-05-23 20:43:42 +02:00
2012-01-06 16:48:27 -05:00
2012-03-06 15:45:30 +02:00
2012-03-06 15:45:30 +02:00
2011-12-02 17:40:40 -05:00
2011-11-26 11:38:40 +00:00
2012-01-11 08:56:24 -05:00
2012-01-11 08:56:24 -05:00
2012-01-11 08:56:24 -05:00
2012-01-11 08:56:24 -05:00
2011-12-02 17:40:40 -05:00
2011-12-03 08:24:27 -08:00
2011-10-21 01:00:41 -07:00
2011-10-21 01:00:41 -07:00
2011-12-16 21:21:48 +00:00
2012-10-14 16:03:24 -04:00
2011-12-28 15:22:18 +01:00
2011-12-28 15:22:18 +01:00
2012-03-14 21:02:23 +01:00
2012-03-06 15:28:00 -08:00
2012-04-29 22:07:03 +02:00
2011-10-20 21:06:58 +02:00
2012-01-11 08:56:24 -05:00
2011-12-02 17:40:40 -05:00
2011-12-02 17:40:40 -05:00
2011-12-11 00:32:25 +01:00
2011-12-05 13:06:58 +01:00
2012-04-29 22:07:03 +02:00
2011-12-02 17:40:40 -05:00
2012-02-28 22:20:45 +01:00
2012-03-14 21:09:19 +01:00
2011-12-02 17:40:40 -05:00
2012-01-11 08:56:24 -05:00
2012-09-28 08:05:24 +02:00
2012-01-15 21:24:18 -05:00
2011-12-16 21:21:48 +00:00
2011-12-19 16:22:30 +01:00
2011-10-07 16:25:31 +02:00
2011-12-02 17:40:40 -05:00
2011-12-02 17:40:40 -05:00
2011-12-21 00:00:03 +01:00
2012-02-29 21:43:20 +01:00
2012-09-28 08:05:24 +02:00
2012-01-10 22:51:56 +01:00
2012-01-10 22:51:56 +01:00
2012-03-08 22:07:55 +01:00
2012-01-16 19:26:41 +01:00
2011-12-02 17:40:40 -05:00
2012-03-08 22:07:55 +01:00
2012-03-14 21:09:28 +01:00
2012-10-06 08:43:43 +02:00
2011-11-26 22:53:47 +00:00
2012-10-06 08:43:43 +02:00
2012-10-06 08:43:43 +02:00
2012-03-08 22:07:55 +01:00
2012-01-13 17:11:41 -05:00
2011-12-18 06:58:03 -08:00
2011-12-02 17:40:40 -05:00
2011-11-28 11:22:36 -08:00
2012-01-04 10:57:37 -08:00
2011-09-07 12:16:15 +02:00
2011-12-11 00:32:25 +01:00
2012-01-14 22:12:53 -05:00
2012-02-26 10:03:16 +01:00
2012-02-26 10:03:16 +01:00
2012-03-08 22:07:55 +01:00
2012-02-26 09:03:33 +01:00
2011-12-02 17:40:40 -05:00
2012-03-08 22:07:55 +01:00
2011-12-02 07:21:08 -08:00
2012-03-08 22:07:55 +01:00
2012-04-29 22:07:01 +02:00
2011-12-19 20:36:26 +02:00