[MPlayer-dev-eng] [PATCH] mencoder: correctly consider encoder delays when examining muxer time

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Oct 17 03:37:45 CEST 2010


On Sat, Oct 16, 2010 at 03:54:56PM -0700, Corey Hickey wrote:
> @@ -1243,9 +1247,15 @@
>      float a_pts=0;
>      float v_pts=0;
>      int skip_flag=0; // 1=skip  -1=duplicate
> +    double a_muxer_time;
> +    double v_muxer_time;
>  
> +    if (mux_a)
> +        a_muxer_time = adjusted_muxer_time(mux_a);
> +    v_muxer_time = adjusted_muxer_time(mux_v);

You could make the function return NOPTS_VALUE for NULL argument,
might make this a bit simpler.
And since you seem to understand it, please document what each of those
time values actually are.

> @@ -1359,7 +1369,7 @@
>  				mux_a->buffer_len += len;
>  			}
>  	    }
> -	    if (mux_v->timer == 0) mux_a->h.dwInitialFrames++;
> +	    if (v_muxer_time == 0) mux_a->h.dwInitialFrames++;

Sure this is really using the right timer?
I'd naively expect that v_muxer_time possibly is never 0.


More information about the MPlayer-dev-eng mailing list