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

Corey Hickey bugfood-ml at fatooh.org
Thu Oct 21 09:10:07 CEST 2010


On 2010-10-18 04:06, Diego Biurrun wrote:
> some minor style nits..
> 
> On Sun, Oct 17, 2010 at 12:48:40PM -0700, Corey Hickey wrote:
>>
>> --- mencoder.c	(revision 32493)
>> +++ mencoder.c	(working copy)
>> @@ -354,15 +354,27 @@
>>  
>> +static double adjusted_muxer_time(muxer_stream_t *mux) {
> 
> K&R places the { on the next line for function declarations.

Done.

>> +    if (! mux) return MP_NOPTS_VALUE;
> 
>   if (!mux)
>       return MP_NOPTS_VALUE;
> 
>> -	if (play_n_frames >= 0) timeleft = mux_v->timer + play_n_frames * (double)(mux_v->h.dwScale) / mux_v->h.dwRate;
>> +	if (play_n_frames >= 0) timeleft = adjusted_muxer_time(mux_v) + play_n_frames * (double)(mux_v->h.dwScale) / mux_v->h.dwRate;
> 
> Break the line while you're at it, same below.

Applied, with this last change as a follow-up commit.

-Corey


More information about the MPlayer-dev-eng mailing list