From bb17df1f07cfc062fedee8946b476a14d6897920 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 25 Apr 2016 11:47:35 +0200 Subject: vd_lavc: set AVCodecContext.time_base to forced time base This is a bit sketchy, as there isn't a truly standard way to communicate the timebase. --- video/decode/vd_lavc.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'video/decode/vd_lavc.c') diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index b6ff8fdc56..c1e3c021f2 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -445,6 +445,9 @@ static void init_avctx(struct dec_video *vd, const char *decoder, avctx->codec_type = AVMEDIA_TYPE_VIDEO; avctx->codec_id = lavc_codec->id; + if (ctx->codec_timebase.num) + avctx->time_base = ctx->codec_timebase; + avctx->refcounted_frames = 1; ctx->pic = av_frame_alloc(); if (!ctx->pic) -- cgit v1.2.3