[FFmpeg-soc] [soc]: r541 - rv40/rv40.c

kostya subversion at mplayerhq.hu
Sun Jul 29 09:56:44 CEST 2007


Author: kostya
Date: Sun Jul 29 09:56:44 2007
New Revision: 541

Log:
Skip slices with incorrect header

Modified:
   rv40/rv40.c

Modified: rv40/rv40.c
==============================================================================
--- rv40/rv40.c	(original)
+++ rv40/rv40.c	Sun Jul 29 09:56:44 2007
@@ -505,6 +505,7 @@ static int rv40_parse_slice_header(RV40D
     int w, h;
 
     memset(si, 0, sizeof(SliceInfo));
+    si->type = -1;
     if(get_bits1(gb))
         return -1;
     si->type = get_bits(gb, 2);
@@ -950,7 +951,7 @@ static int rv40_decode_frame(AVCodecCont
     r->slice_data = av_realloc(r->slice_data, buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
     memcpy(r->slice_data, buf, buf_size);
     r->prev_si = si;
-    r->has_slice = 1;
+    r->has_slice = si.type != -1;
 
     return buf_size;
 }



More information about the FFmpeg-soc mailing list