diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-03-29 18:34:19 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-03-30 13:30:37 +0100 |
commit | 612d9cdbe90a9cb0319b093efa54efa71bb1e4c4 (patch) | |
tree | 132acc99677d356cacdb4f639bf9aef04b3e4e32 /ffplay.c | |
parent | ee53777e705ab8db8b792b5e5f0aeea745791de4 (diff) | |
download | ffmpeg-612d9cdbe90a9cb0319b093efa54efa71bb1e4c4.tar.gz |
ffplay: use av_guess_frame_rate()
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffplay.c')
-rw-r--r-- | ffplay.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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"), |