mirror of
https://github.com/mpv-player/mpv
synced 2024-10-02 16:25:33 +02:00
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.
This commit is contained in:
parent
4f5509e1dd
commit
bb17df1f07
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user