avformat/utils: add missing FF_API_LAVF_AVCTX check

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2020-10-01 22:47:51 -03:00
parent 10c01c3779
commit a7489c0fbd
1 changed files with 12 additions and 2 deletions

View File

@ -5704,8 +5704,18 @@ int avformat_transfer_internal_stream_timing_info(const AVOutputFormat *ofmt,
enum AVTimebaseSource copy_tb)
{
//TODO: use [io]st->internal->avctx
const AVCodecContext *dec_ctx = ist->codec;
AVCodecContext *enc_ctx = ost->codec;
const AVCodecContext *dec_ctx;
AVCodecContext *enc_ctx;
#if FF_API_LAVF_AVCTX
FF_DISABLE_DEPRECATION_WARNINGS
dec_ctx = ist->codec;
enc_ctx = ost->codec;
FF_ENABLE_DEPRECATION_WARNINGS
#else
dec_ctx = ist->internal->avctx;
enc_ctx = ost->internal->avctx;
#endif
enc_ctx->time_base = ist->time_base;
/*