[FFmpeg-devel] [PATCH] lavf: consider codec framerate for framerate detection

wm4 nfxjfg at googlemail.com
Thu Jun 8 11:46:56 EEST 2017


On Wed, 7 Jun 2017 21:23:12 +0200 (CEST)
Marton Balint <cus at passwd.hu> wrote:

> On Wed, 7 Jun 2017, wm4 wrote:
> 
> > On Wed, 31 May 2017 18:26:01 +0200
> > wm4 <nfxjfg at googlemail.com> wrote:
> >  
> >> Fixes detection of some TV sample as 24.5 FPS. With the patch applied,
> >> it's detected as 25 FPS.
> >> 
> >> This is enabled for mpegts only.
> >> ---
> >>  libavformat/internal.h |  5 +++++
> >>  libavformat/mpegts.c   |  2 ++
> >>  libavformat/utils.c    | 10 ++++++++++
> >>  3 files changed, 17 insertions(+)
> >> 
> >> diff --git a/libavformat/internal.h b/libavformat/internal.h
> >> index c856945ce9..d136c79bdd 100644
> >> --- a/libavformat/internal.h
> >> +++ b/libavformat/internal.h
> >> @@ -145,6 +145,11 @@ struct AVFormatInternal {
> >>       * ID3v2 tag useful for MP3 demuxing
> >>       */
> >>      AVDictionary *id3v2_meta;
> >> +
> >> +    /*
> >> +     * Prefer the codec framerate for avg_frame_rate computation.
> >> +     */
> >> +    int prefer_codec_framerate;  
> 
> Does this approach have any benefit over signalling this feature as a 
> demuxer flag?

There are no private demuxer flags AFAIK, but there are other flags in
the internal struct. So seemed like a good choice.


More information about the ffmpeg-devel mailing list