[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec h264.c,1.128,1.129

Loren Merritt CVS lorenm
Thu May 19 06:48:09 CEST 2005


Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv4857

Modified Files:
	h264.c 
Log Message:
fix crash on negative POC


Index: h264.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/h264.c,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -d -r1.128 -r1.129
--- h264.c	18 May 2005 09:17:21 -0000	1.128
+++ h264.c	19 May 2005 04:48:06 -0000	1.129
@@ -3156,11 +3156,11 @@
     
     if(h->slice_type==B_TYPE){
         int out_i;
-        int limit= -1;
+        int limit= INT_MIN;
 
         /* sort frame according to poc in B slice */
         for(out_i=0; out_i<h->short_ref_count; out_i++){
-            int best_i=-1;
+            int best_i=INT_MIN;
             int best_poc=INT_MAX;
 
             for(i=0; i<h->short_ref_count; i++){
@@ -3171,7 +3171,7 @@
                 }
             }
             
-            assert(best_i != -1);
+            assert(best_i != INT_MIN);
             
             limit= best_poc;
             sorted_short_ref[out_i]= *h->short_ref[best_i];





More information about the ffmpeg-cvslog mailing list