changeset 3092:421579792fc2 libavcodec

1 goto 1 fix
author michael
date Mon, 06 Feb 2006 11:21:26 +0000
parents 0284d5b34916
children 19f3dd63af7d
files mpegvideo.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
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++);