Fix future ffmpeg support

The AV_ prefixed constants have been available since
ffmpeg@def97856de6021965db86c25a732d78689bd6bb0 (2015-07-07), or version
2.8.

The non-prefixed constants are set to be removed in the next ffmpeg
release, and were removed in
ffmpeg@302554835e39b79b977ed60c9afe81b44590dfef (2016-12-05).
This commit is contained in:
Dan Church 2017-12-28 09:41:45 -06:00
parent 7c3d75bf1d
commit 78df32c77f
No known key found for this signature in database
GPG Key ID: EA2BF379CD2CDBD0
2 changed files with 5 additions and 5 deletions

View File

@ -207,8 +207,8 @@ static BOOL tsmf_ffmpeg_init_stream(ITSMFDecoder* decoder, const TS_AM_MEDIA_TYP
}
}
if (mdecoder->codec->capabilities & CODEC_CAP_TRUNCATED)
mdecoder->codec_context->flags |= CODEC_FLAG_TRUNCATED;
if (mdecoder->codec->capabilities & AV_CODEC_CAP_TRUNCATED)
mdecoder->codec_context->flags |= AV_CODEC_FLAG_TRUNCATED;
return TRUE;
}

View File

@ -146,7 +146,7 @@ static BOOL libavcodec_create_encoder(H264_CONTEXT* h264)
};
av_opt_set(sys->codecEncoderContext, "preset", "veryfast", AV_OPT_SEARCH_CHILDREN);
av_opt_set(sys->codecEncoderContext, "tune", "zerolatency", AV_OPT_SEARCH_CHILDREN);
sys->codecEncoderContext->flags |= CODEC_FLAG_LOOP_FILTER;
sys->codecEncoderContext->flags |= AV_CODEC_FLAG_LOOP_FILTER;
sys->codecEncoderContext->me_cmp |= 1;
sys->codecEncoderContext->me_subpel_quality = 3;
sys->codecEncoderContext->me_range = 16;
@ -404,9 +404,9 @@ static BOOL libavcodec_init(H264_CONTEXT* h264)
goto EXCEPTION;
}
if (sys->codecDecoder->capabilities & CODEC_CAP_TRUNCATED)
if (sys->codecDecoder->capabilities & AV_CODEC_CAP_TRUNCATED)
{
sys->codecDecoderContext->flags |= CODEC_FLAG_TRUNCATED;
sys->codecDecoderContext->flags |= AV_CODEC_FLAG_TRUNCATED;
}
if (avcodec_open2(sys->codecDecoderContext, sys->codecDecoder, NULL) < 0)