[vlc-devel] Question about video FPS probing in AVFormat demuxer

Rafaël Carré funman at videolan.org
Mon Mar 10 11:03:49 CET 2014


Hello,

Since we are setting a property of the video stream, I think we should use
the video codec frame rate.

Does this patch fix a problem?

On 03/10/14 09:22, 某因幡 wrote:
> Hi,
> 
> As the code piece below shows, when creating new ES, why using time base
> from codec not in stream, or it means something else here?
> 
> 
> --- a/modules/demux/avformat/demux.c
> +++ b/modules/demux/avformat/demux.c
> @@ -367,8 +367,8 @@ int OpenDemux( vlc_object_t *p_this )
>  # warning FIXME: implement palette transmission
>  #endif
>              psz_type = "video";
> -            fmt.video.i_frame_rate = cc->time_base.den;
> -            fmt.video.i_frame_rate_base = cc->time_base.num * __MAX(
> cc->ticks_per_frame, 1 );
> +            fmt.video.i_frame_rate = s->r_frame_rate.den;
> +            fmt.video.i_frame_rate_base = s->r_frame_rate.num;
>              fmt.video.i_sar_num = s->sample_aspect_ratio.num;
>              if (s->sample_aspect_ratio.num > 0)
>                  fmt.video.i_sar_den = s->sample_aspect_ratio.den;



More information about the vlc-devel mailing list