UPDATE: gegl - FFmpeg API

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

UPDATE: gegl - FFmpeg API

Brad Smith-14
Update API usage to deal with current vs new FFmpeg API.


Index: Makefile
===================================================================
RCS file: /home/cvs/ports/graphics/gegl/Makefile,v
retrieving revision 1.66
diff -u -p -u -p -r1.66 Makefile
--- Makefile 24 Oct 2018 14:28:05 -0000 1.66
+++ Makefile 18 Feb 2019 00:35:19 -0000
@@ -17,8 +17,8 @@ CATEGORIES= graphics devel
 PKGNAME-main= gegl-${V}
 PKGNAME-plugins= gegl-plugins-${V}
 
-REVISION-main= 1
-REVISION-plugins= 1
+REVISION-main= 2
+REVISION-plugins= 2
 
 SHARED_LIBS +=  gegl-0.2             0.0      # 201.1
 SHARED_LIBS +=  gegl-sc-0.2          0.0      # unknown
Index: patches/patch-operations_external_ff-load_c
===================================================================
RCS file: patches/patch-operations_external_ff-load_c
diff -N patches/patch-operations_external_ff-load_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-operations_external_ff-load_c 18 Feb 2019 00:34:50 -0000
@@ -0,0 +1,27 @@
+$OpenBSD$
+
+Update for newer FFmpeg API.
+
+Index: operations/external/ff-load.c
+--- operations/external/ff-load.c.orig
++++ operations/external/ff-load.c
+@@ -309,8 +309,8 @@ prepare (GeglOperation *operation)
+           g_warning ("codec not found");
+         }
+
+-      if (p->codec->capabilities & CODEC_CAP_TRUNCATED)
+-        p->enc->flags |= CODEC_FLAG_TRUNCATED;
++      if (p->codec->capabilities & AV_CODEC_CAP_TRUNCATED)
++        p->enc->flags |= AV_CODEC_FLAG_TRUNCATED;
+
+       if (avcodec_open2 (p->enc, p->codec, NULL) < 0)
+         {
+@@ -321,7 +321,7 @@ prepare (GeglOperation *operation)
+       p->width = p->enc->width;
+       p->height = p->enc->height;
+       p->frames = 10000000;
+-      p->lavc_frame = avcodec_alloc_frame ();
++      p->lavc_frame = av_frame_alloc ();
+
+       if (p->fourcc)
+         g_free (p->fourcc);