From: Dan Church Date: Thu, 28 Dec 2017 15:41:45 +0000 (-0600) Subject: Fix future ffmpeg support X-Git-Tag: 2.0.0-rc2~97^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=78df32c77f28955005025ccc82edd97ac009efd1;p=platform%2Fupstream%2Ffreerdp.git 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). --- diff --git a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c index 493cc93..8ead90b 100644 --- a/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c +++ b/channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c @@ -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; } diff --git a/libfreerdp/codec/h264_ffmpeg.c b/libfreerdp/codec/h264_ffmpeg.c index 6847801..2ab730a 100644 --- a/libfreerdp/codec/h264_ffmpeg.c +++ b/libfreerdp/codec/h264_ffmpeg.c @@ -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)