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 09:44:48 +0000 (10:44 +0100)
CC: libav-stable@libav.org
Bug-ID: 781

libavcodec/h264.c

index 67c7eef..b902422 100644 (file)
@@ -1456,6 +1456,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];