[Mplayer-cvslog] CVS: main/libmpcodecs ve_x264.c,1.7,1.8

Ivan Kalvachev CVS syncmail at mplayerhq.hu
Sun Oct 17 19:59:41 CEST 2004


CVS change done by Ivan Kalvachev CVS

Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var2/tmp/cvs-serv14501

Modified Files:
	ve_x264.c 
Log Message:
Mark I-frames as seekable only if we encode with one reference frame, IDR are always seekable
patch send by Loren Merritt


Index: ve_x264.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_x264.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ve_x264.c	8 Oct 2004 12:38:39 -0000	1.7
+++ ve_x264.c	17 Oct 2004 17:59:38 -0000	1.8
@@ -304,7 +304,9 @@
         i_size += x264_nal_encode(mod->mux->buffer + i_size, &i_data, 1, &nal[i]);
     }
     if(i_size>0) {
-        muxer_write_chunk(mod->mux, i_size, (mod->pic.i_type == X264_TYPE_I)?0x10:0);
+        int keyframe = (mod->pic.i_type == X264_TYPE_IDR) ||
+                       (mod->pic.i_type == X264_TYPE_I && frame_ref == 1);
+        muxer_write_chunk(mod->mux, i_size, keyframe?0x10:0);
     }
     return 1;
 }




More information about the MPlayer-cvslog mailing list