summaryrefslogtreecommitdiffstats
path: root/video/decode/vd_lavc.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-04-25 11:47:35 +0200
committerwm4 <wm4@nowhere>2016-04-25 12:23:37 +0200
commitbb17df1f07cfc062fedee8946b476a14d6897920 (patch)
tree4d664409dec3956c490216ed2013207219087a3a /video/decode/vd_lavc.c
parent4f5509e1dd421ad144090499ee083f63f54313dd (diff)
downloadmpv-bb17df1f07cfc062fedee8946b476a14d6897920.tar.bz2
mpv-bb17df1f07cfc062fedee8946b476a14d6897920.tar.xz
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.
Diffstat (limited to 'video/decode/vd_lavc.c')
-rw-r--r--video/decode/vd_lavc.c3
1 files changed, 3 insertions, 0 deletions
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)