[FFmpeg-devel] [PATCH] ffplay: use av_guess_frame_rate()

Michael Niedermayer michaelni at gmx.at
Sat Mar 30 13:29:19 CET 2013


On Sat, Mar 30, 2013 at 02:35:05AM +0100, Marton Balint wrote:
> 
> 
> On Fri, 29 Mar 2013, Michael Niedermayer wrote:
> 
> >Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> >---
> >ffplay.c |    3 +++
> >1 file changed, 3 insertions(+)
> >
> >diff --git a/ffplay.c b/ffplay.c
> >index fb09dd6..7406fa2 100644
> >--- a/ffplay.c
> >+++ b/ffplay.c
> >@@ -1760,6 +1760,7 @@ static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const c
> >    AVBufferSinkParams *buffersink_params = av_buffersink_params_alloc();
> >    AVFilterContext *filt_src = NULL, *filt_out = NULL, *filt_crop;
> >    AVCodecContext *codec = is->video_st->codec;
> >+    AVRational fr = av_guess_frame_rate(is->ic, is->video_st, NULL);
> >
> >    if (!buffersink_params)
> >        return AVERROR(ENOMEM);
> >@@ -1773,6 +1774,8 @@ static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const c
> >             frame->width, frame->height, frame->format,
> >             is->video_st->time_base.num, is->video_st->time_base.den,
> >             codec->sample_aspect_ratio.num, FFMAX(codec->sample_aspect_ratio.den, 1));
> >+    if (fr.num && fr.den)
> >+        av_strlcatf(buffersrc_args, sizeof(buffersrc_args), ":frame_rate=%d/%d", fr.num, fr.den);
> >
> >    if ((ret = avfilter_graph_create_filter(&filt_src,
> >                                            avfilter_get_by_name("buffer"),
> 
> LGTM, thanks.

applied

thanks

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130330/3e4c5127/attachment.asc>


More information about the ffmpeg-devel mailing list