diff mpegvideo.c @ 3092:421579792fc2 libavcodec

1 goto 1 fix
author michael
date Mon, 06 Feb 2006 11:21:26 +0000
parents 072dbc669253
children ede5c3c0a0eb
line wrap: on
line diff
--- a/mpegvideo.c	Mon Feb 06 11:21:10 2006 +0000
+++ b/mpegvideo.c	Mon Feb 06 11:21:26 2006 +0000
@@ -231,6 +231,10 @@
 const uint8_t *ff_find_start_code(const uint8_t * restrict p, const uint8_t *end, uint32_t * restrict state){
     int i;
 
+    assert(p<=end);
+    if(p>=end)
+        return end;
+
     for(i=0; i<3; i++){
         uint32_t tmp= *state << 8;
         *state= tmp + *(p++);