[MPlayer-dev-eng] [PATCH] ve_lavc: fix 1st pass file generation
James Zern
jzern at google.com
Sat Feb 5 01:36:22 CET 2011
For codecs that produce no data on the first pass, e.g.
libtheora/libvpx, the stats file will come out empty due to the fact
that the check for stats is after one on the output frame size.
The attached moves the stats check prior to this. I verified that the
stats file generated for x264 is unaffected by this change.
-------------- next part --------------
Index: libmpcodecs/ve_lavc.c
===================================================================
--- libmpcodecs/ve_lavc.c (revision 32850)
+++ libmpcodecs/ve_lavc.c (working copy)
@@ -828,6 +828,9 @@ static int encode_frame(struct vf_instan
assert(MP_NOPTS_VALUE == AV_NOPTS_VALUE);
#endif
//fprintf(stderr, "ve_lavc %f/%f\n", dts, pts);
+ /* store stats if there are any */
+ if(lavc_venc_context->stats_out && stats_file)
+ fprintf(stats_file, "%s", lavc_venc_context->stats_out);
if(out_size == 0 && lavc_param_skip_threshold==0 && lavc_param_skip_factor==0){
++mux_v->encoder_delay;
return 0;
@@ -889,9 +892,6 @@ static int encode_frame(struct vf_instan
pict_type_char[lavc_venc_context->coded_frame->pict_type]
);
}
- /* store stats if there are any */
- if(lavc_venc_context->stats_out && stats_file)
- fprintf(stats_file, "%s", lavc_venc_context->stats_out);
return out_size;
}
More information about the MPlayer-dev-eng
mailing list