Update API usage to deal with current vs new FFmpeg API.

Index: Makefile
===================================================================
RCS file: /home/cvs/ports/x11/freerdp/Makefile,v
retrieving revision 1.36
diff -u -p -u -p -r1.36 Makefile
--- Makefile    10 Feb 2019 20:47:51 -0000      1.36
+++ Makefile    17 Feb 2019 20:49:26 -0000
@@ -6,7 +6,7 @@ BROKEN-hppa =           undefined reference to __
 COMMENT =              client for Microsoft RDP (remote desktop protocol)
 DISTNAME =             freerdp-2.0.0-rc1
 PKGNAME =              freerdp-2.0.0rc1
-REVISION =             3
+REVISION =             4
 CATEGORIES =           x11 net
 
 SHARED_LIBS +=  freerdp-client2           0.0 # 2.0
Index: patches/patch-channels_tsmf_client_ffmpeg_tsmf_ffmpeg_c
===================================================================
RCS file: patches/patch-channels_tsmf_client_ffmpeg_tsmf_ffmpeg_c
diff -N patches/patch-channels_tsmf_client_ffmpeg_tsmf_ffmpeg_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-channels_tsmf_client_ffmpeg_tsmf_ffmpeg_c     17 Feb 2019 
20:48:49 -0000
@@ -0,0 +1,18 @@
+$OpenBSD$
+
+Fix future ffmpeg support
+
+Index: channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
+--- channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c.orig
++++ channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
+@@ -207,8 +207,8 @@ static BOOL tsmf_ffmpeg_init_stream(ITSMFDecoder* deco
+               }
+       }
+ 
+-      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;
+ }
+ 
Index: patches/patch-libfreerdp_codec_h264_ffmpeg_c
===================================================================
RCS file: patches/patch-libfreerdp_codec_h264_ffmpeg_c
diff -N patches/patch-libfreerdp_codec_h264_ffmpeg_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-libfreerdp_codec_h264_ffmpeg_c        17 Feb 2019 20:49:01 
-0000
@@ -0,0 +1,28 @@
+$OpenBSD$
+
+Fix future ffmpeg support
+
+Index: libfreerdp/codec/h264_ffmpeg.c
+--- libfreerdp/codec/h264_ffmpeg.c.orig
++++ libfreerdp/codec/h264_ffmpeg.c
+@@ -146,7 +146,7 @@ static BOOL libavcodec_create_encoder(H264_CONTEXT* h2
+       };
+       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)

Reply via email to