[vlc-devel] [PATCH 1/7] codec/libmpeg2: Reduce frame rate to simplest fraction

David Flynn davidf+nntp at woaf.net
Sat Nov 29 14:43:42 CET 2008


> On Thu, Nov 27, 2008, davidf+nntp at woaf.net wrote:
>> diff --git a/modules/codec/libmpeg2.c b/modules/codec/libmpeg2.c
>> index 11dbb2f..249cf08 100644
>> --- a/modules/codec/libmpeg2.c
>> +++ b/modules/codec/libmpeg2.c
>> @@ -627,10 +627,11 @@ static picture_t *GetNewPicture( decoder_t *p_dec, uint8_t **pp_buf )
>>  
>>      if( p_sys->p_info->sequence->frame_period > 0 )
>>      {
>> -        p_dec->fmt_out.video.i_frame_rate =
>> -            (uint32_t)( (uint64_t)1001000000 * 27 /
>> -                        p_sys->p_info->sequence->frame_period );
>> -        p_dec->fmt_out.video.i_frame_rate_base = 1001;
>> +        vlc_ureduce( &p_dec->fmt_out.video.i_frame_rate,
>> +                     &p_dec->fmt_out.video.i_frame_rate_base,
>> +                     27 * 1000000,
>> +                     p_sys->p_info->sequence->frame_period,
>> +                     0 );
On 2008-11-29, Laurent Aimar <fenrir at via.ecp.fr> wrote:
>  Unless it is needed to fix a bug, I will not apply this one.
> The vout already does it for all decoder.

sout/transcode should probably do the same then.

..david




More information about the vlc-devel mailing list