Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Dec 2016 08:08:41 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r428398 - in head/graphics/gegl: . files
Message-ID:  <201612120808.uBC88f2M011279@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Mon Dec 12 08:08:41 2016
New Revision: 428398
URL: https://svnweb.freebsd.org/changeset/ports/428398

Log:
  graphics/gegl: unbreak FFMPEG=on runtime
  
  $ gimp /path/to/file.png
  GEGL-geglmodule.c-Message: Module '/usr/local/lib/gegl-0.2/ff-load.so'
  load error: /usr/local/lib/gegl-0.2/ff-load.so: Undefined symbol "av_read_packet"
  
  $ echo CFLAGS+=-Werror=implicit-function-declaration >>Makefile.local
  $ make
  [...]
  ./ff-load.c:140:9: error: implicit declaration of function 'av_close_input_file' is invalid in C99
        [-Werror,-Wimplicit-function-declaration]
          av_close_input_file (p->ic);
          ^
  ./ff-load.c:219:23: error: implicit declaration of function 'av_read_packet' is invalid in C99
        [-Werror,-Wimplicit-function-declaration]
                    if (av_read_packet (p->ic, &p->pkt) < 0)
                        ^
  ./ff-load.c:274:13: error: implicit declaration of function 'av_open_input_file' is invalid in C99
        [-Werror,-Wimplicit-function-declaration]
        err = av_open_input_file (&p->ic, o->path, NULL, 0, NULL);
              ^
  ./ff-load.c:279:13: error: implicit declaration of function 'av_find_stream_info' is invalid in C99
        [-Werror,-Wimplicit-function-declaration]
        err = av_find_stream_info (p->ic);
              ^
  ./ff-load.c:279:13: note: did you mean 'avformat_find_stream_info'?
  /usr/local/include/libavformat/avformat.h:2217:5: note: 'avformat_find_stream_info' declared here
  int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options);
      ^
  ./ff-load.c:315:11: error: implicit declaration of function 'avcodec_open' is invalid in C99
        [-Werror,-Wimplicit-function-declaration]
        if (avcodec_open (p->enc, p->codec) < 0)
            ^
  ./ff-load.c:315:11: note: did you mean 'avcodec_open2'?
  /usr/local/include/libavcodec/avcodec.h:4324:5: note: 'avcodec_open2' declared here
  int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options);
      ^
  ./ff-load.c:324:23: error: implicit declaration of function 'avcodec_alloc_frame' is invalid in C99
        [-Werror,-Wimplicit-function-declaration]
        p->lavc_frame = avcodec_alloc_frame ();
                        ^
  
  PR:		207547
  Approved by:	portmgr blanket

Added:
  head/graphics/gegl/files/patch-operations_external_ff-load.c   (contents, props changed)
Modified:
  head/graphics/gegl/Makefile   (contents, props changed)

Modified: head/graphics/gegl/Makefile
==============================================================================
--- head/graphics/gegl/Makefile	Mon Dec 12 07:27:09 2016	(r428397)
+++ head/graphics/gegl/Makefile	Mon Dec 12 08:08:41 2016	(r428398)
@@ -3,7 +3,7 @@
 
 PORTNAME=	gegl
 PORTVERSION=	0.2.0
-PORTREVISION=	18
+PORTREVISION=	19
 CATEGORIES=	graphics
 MASTER_SITES=	GIMP
 

Added: head/graphics/gegl/files/patch-operations_external_ff-load.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/gegl/files/patch-operations_external_ff-load.c	Mon Dec 12 08:08:41 2016	(r428398)
@@ -0,0 +1,59 @@
+https://git.gnome.org/browse/gegl/commit/?id=97067622352e
+https://git.gnome.org/browse/gegl/commit/?id=6d50c42e2c9a
+
+--- operations/external/ff-load.c.orig	2012-04-01 11:17:57 UTC
++++ operations/external/ff-load.c
+@@ -137,7 +137,7 @@ ff_cleanup (GeglChantO *o)
+       if (p->enc)
+         avcodec_close (p->enc);
+       if (p->ic)
+-        av_close_input_file (p->ic);
++        avformat_close_input(&p->ic);
+       if (p->lavc_frame)
+         av_free (p->lavc_frame);
+ 
+@@ -216,9 +216,9 @@ decode_frame (GeglOperation *operation,
+             {
+               do
+                 {
+-                  if (av_read_packet (p->ic, &p->pkt) < 0)
++                  if (av_read_frame (p->ic, &p->pkt) < 0)
+                     {
+-                      fprintf (stderr, "av_read_packet failed for %s\n",
++                      fprintf (stderr, "av_read_frame failed for %s\n",
+                                o->path);
+                       return -1;
+                     }
+@@ -271,12 +271,12 @@ prepare (GeglOperation *operation)
+       gint err;
+ 
+       ff_cleanup (o);
+-      err = av_open_input_file (&p->ic, o->path, NULL, 0, NULL);
++      err = avformat_open_input(&p->ic, o->path, NULL, 0);
+       if (err < 0)
+         {
+           print_error (o->path, err);
+         }
+-      err = av_find_stream_info (p->ic);
++      err = avformat_find_stream_info (p->ic, NULL);
+       if (err < 0)
+         {
+           g_warning ("ff-load: error finding stream info for %s", o->path);
+@@ -312,7 +312,7 @@ prepare (GeglOperation *operation)
+       if (p->codec->capabilities & CODEC_CAP_TRUNCATED)
+         p->enc->flags |= CODEC_FLAG_TRUNCATED;
+ 
+-      if (avcodec_open (p->enc, p->codec) < 0)
++      if (avcodec_open2 (p->enc, p->codec, NULL) < 0)
+         {
+           g_warning ("error opening codec %s", p->enc->codec->name);
+           return;
+@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612120808.uBC88f2M011279>