From 883795fb0face00a07349fbd32f4775431a9f30d Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 25 Dec 2014 22:46:39 +0100 Subject: [PATCH] h264: restore a block mistakenly removed in e10fd08a CC: libav-stable@libav.org Bug-ID: 781 (cherry picked from commit 60d4c6ff76467d4d8f55c1cc61ab6c618e8ea2f3) Signed-off-by: Anton Khirnov --- libavcodec/h264.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 562b1023e3..4bc0a03c24 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1454,6 +1454,8 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size, buf_index = find_start_code(buf, buf_size, buf_index, next_avc); if (buf_index >= buf_size) break; + if (buf_index >= next_avc) + continue; } hx = h->thread_context[context_count];