h264: restore a block mistakenly removed in e10fd08a
authorAnton Khirnov <anton@khirnov.net>
Thu, 25 Dec 2014 21:46:39 +0000 (22:46 +0100)
committerAnton Khirnov <anton@khirnov.net>
Sat, 27 Dec 2014 10:07:45 +0000 (11:07 +0100)
CC: libav-stable@libav.org
Bug-ID: 781
(cherry picked from commit 60d4c6ff76467d4d8f55c1cc61ab6c618e8ea2f3)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavcodec/h264.c

index 562b102..4bc0a03 100644 (file)
@@ -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];