diff options
Diffstat (limited to 'audio/decode/ad_lavc.c')
-rw-r--r-- | audio/decode/ad_lavc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/audio/decode/ad_lavc.c b/audio/decode/ad_lavc.c index c785c62c90..78d0cec807 100644 --- a/audio/decode/ad_lavc.c +++ b/audio/decode/ad_lavc.c @@ -86,7 +86,7 @@ static int init(struct dec_audio *da, const char *decoder) struct priv *ctx = talloc_zero(NULL, struct priv); da->priv = ctx; - ctx->codec_timebase = (AVRational){0}; + ctx->codec_timebase = mp_get_codec_timebase(da->codec); ctx->force_channel_map = c->force_channels; @@ -103,6 +103,7 @@ static int init(struct dec_audio *da, const char *decoder) lavc_context->refcounted_frames = 1; lavc_context->codec_type = AVMEDIA_TYPE_AUDIO; lavc_context->codec_id = lavc_codec->id; + lavc_context->time_base = ctx->codec_timebase; if (opts->downmix && mpopts->audio_output_channels.num_chmaps == 1) { lavc_context->request_channel_layout = |