[MPlayer-cvslog] r32928 - trunk/libmpcodecs/ve_lavc.c

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Feb 19 16:35:52 CET 2011


On Sat, Feb 19, 2011 at 10:17:38AM +0100, ranma wrote:
> Author: ranma
> Date: Sat Feb 19 10:17:38 2011
> New Revision: 32928
> 
> Log:
> 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.
> 
> Patch by James Zern, jzern google com
> 
> Modified:
>    trunk/libmpcodecs/ve_lavc.c
> 
> Modified: trunk/libmpcodecs/ve_lavc.c
> ==============================================================================
> --- trunk/libmpcodecs/ve_lavc.c	Fri Feb 18 23:14:47 2011	(r32927)
> +++ trunk/libmpcodecs/ve_lavc.c	Sat Feb 19 10:17:38 2011	(r32928)
> @@ -812,6 +812,10 @@ static int encode_frame(struct vf_instan
>  	out_size = avcodec_encode_video(lavc_venc_context, mux_v->buffer, mux_v->buffer_size,
>  	    pic);
>  
> +    /* store stats if there are any */
> +    if(lavc_venc_context->stats_out && stats_file)
> +        fprintf(stats_file, "%s", lavc_venc_context->stats_out);

Do you know if we need to free/NULL the stats_out so we do not write the
same thing multiple times when e.g. due to encoder delay we are calling
encode_video more often than the number of input frames?
I know there was some discussion about this on the FFmpeg list but
I do not remember a single detail...


More information about the MPlayer-cvslog mailing list