diff options
Diffstat (limited to 'video/decode/vd_lavc.c')
-rw-r--r-- | video/decode/vd_lavc.c | 3 |
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) |