diff options
author | Piotr Fusik <piotr@fusik.info> | 2014-12-05 15:47:05 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-12-05 17:36:19 +0100 |
commit | 542332e523cd5c055bd9a97a055008f3342b4edc (patch) | |
tree | 3a23b9b940732eca0a214f8f396d33460b4ad127 | |
parent | aa24dd487f1a4d5d4ed8b63a58ab4490afa8dc76 (diff) | |
download | ffmpeg-542332e523cd5c055bd9a97a055008f3342b4edc.tar.gz |
doc/examples/filtering_video: fix frame rate
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c99e5191ab846d4897dfc565ba446ec960e04aa9)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | doc/examples/filtering_video.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/examples/filtering_video.c b/doc/examples/filtering_video.c index 8d595735b3..601c3d87f0 100644 --- a/doc/examples/filtering_video.c +++ b/doc/examples/filtering_video.c @@ -90,6 +90,7 @@ static int init_filters(const char *filters_descr) AVFilter *buffersink = avfilter_get_by_name("buffersink"); AVFilterInOut *outputs = avfilter_inout_alloc(); AVFilterInOut *inputs = avfilter_inout_alloc(); + AVRational time_base = fmt_ctx->streams[video_stream_index]->time_base; enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE }; filter_graph = avfilter_graph_alloc(); @@ -102,7 +103,7 @@ static int init_filters(const char *filters_descr) snprintf(args, sizeof(args), "video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:pixel_aspect=%d/%d", dec_ctx->width, dec_ctx->height, dec_ctx->pix_fmt, - dec_ctx->time_base.num, dec_ctx->time_base.den, + time_base.num, time_base.den, dec_ctx->sample_aspect_ratio.num, dec_ctx->sample_aspect_ratio.den); ret = avfilter_graph_create_filter(&buffersrc_ctx, buffersrc, "in", |