diff options
Diffstat (limited to 'libavformat/mux.c')
-rw-r--r-- | libavformat/mux.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/mux.c b/libavformat/mux.c index 33301f1d79..6239fd192d 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -309,6 +309,12 @@ FF_DISABLE_DEPRECATION_WARNINGS FF_ENABLE_DEPRECATION_WARNINGS #endif + /* update internal context from codecpar, old bsf api needs this + * FIXME: remove when autobsf uses new bsf API */ + ret = avcodec_parameters_to_context(st->internal->avctx, st->codecpar); + if (ret < 0) + goto fail; + if (!st->time_base.num) { /* fall back on the default timebase values */ if (par->codec_type == AVMEDIA_TYPE_AUDIO && par->sample_rate) |