[MPlayer-cvslog] r30789 - in trunk: libmpcodecs/ve_x264.c mencoder.c

reimar subversion at mplayerhq.hu
Sun Feb 28 08:45:24 CET 2010


Author: reimar
Date: Sun Feb 28 08:45:23 2010
New Revision: 30789

Log:
Use the KEFRAME define instead of some magic number.

Modified:
   trunk/libmpcodecs/ve_x264.c
   trunk/mencoder.c

Modified: trunk/libmpcodecs/ve_x264.c
==============================================================================
--- trunk/libmpcodecs/ve_x264.c	Sun Feb 28 04:26:18 2010	(r30788)
+++ trunk/libmpcodecs/ve_x264.c	Sun Feb 28 08:45:23 2010	(r30789)
@@ -263,7 +263,7 @@ static int encode_frame(struct vf_instan
                         && param.i_frame_reference == 1
                         && !param.i_bframe);
         memcpy(mod->mux->buffer, nal->p_payload, i_size);
-        muxer_write_chunk(mod->mux, i_size, keyframe?0x10:0, MP_NOPTS_VALUE, MP_NOPTS_VALUE);
+        muxer_write_chunk(mod->mux, i_size, keyframe?AVIIF_KEYFRAME:0, MP_NOPTS_VALUE, MP_NOPTS_VALUE);
     }
     else
         ++mod->mux->encoder_delay;

Modified: trunk/mencoder.c
==============================================================================
--- trunk/mencoder.c	Sun Feb 28 04:26:18 2010	(r30788)
+++ trunk/mencoder.c	Sun Feb 28 08:45:23 2010	(r30789)
@@ -1222,7 +1222,7 @@ if(sh_audio){
 	    }
 	}
 	if(len<=0) break; // EOF?
-	muxer_write_chunk(mux_a,len,0x10, MP_NOPTS_VALUE, MP_NOPTS_VALUE);
+	muxer_write_chunk(mux_a,len,AVIIF_KEYFRAME, MP_NOPTS_VALUE, MP_NOPTS_VALUE);
 	if(!mux_a->h.dwSampleSize && mux_a->timer>0)
 	    mux_a->wf->nAvgBytesPerSec=0.5f+(double)mux_a->size/mux_a->timer; // avg bps (VBR)
 	if(mux_a->buffer_len>=len){
@@ -1308,11 +1308,11 @@ ptimer_start = GetTimerMS();
 switch(mux_v->codec){
 case VCODEC_COPY:
     mux_v->buffer=frame_data.start;
-    if(skip_flag<=0) muxer_write_chunk(mux_v,frame_data.in_size,(sh_video->ds->flags&1)?0x10:0, MP_NOPTS_VALUE, MP_NOPTS_VALUE);
+    if(skip_flag<=0) muxer_write_chunk(mux_v,frame_data.in_size,(sh_video->ds->flags&1)?AVIIF_KEYFRAME:0, MP_NOPTS_VALUE, MP_NOPTS_VALUE);
     break;
 case VCODEC_FRAMENO:
     mux_v->buffer=(unsigned char *)&decoded_frameno; // tricky
-    if(skip_flag<=0) muxer_write_chunk(mux_v,sizeof(int),0x10, MP_NOPTS_VALUE, MP_NOPTS_VALUE);
+    if(skip_flag<=0) muxer_write_chunk(mux_v,sizeof(int),AVIIF_KEYFRAME, MP_NOPTS_VALUE, MP_NOPTS_VALUE);
     break;
 default:
     // decode_video will callback down to ve_*.c encoders, through the video filters


More information about the MPlayer-cvslog mailing list