Hi!

I needed to use picard, but it's broken:

$ picard
/usr/local/bin/python2.7:/usr/local/lib/python2.7/site-packages/picard/musicdns/avcodec.so:
 undefined symbol 'av_open_input_file'
W: 27023376945536 17:47:16 No decoders found! Fingerprinting will be disabled.

The following diff unbreaks it.
OK?

Ciao,
David


Index: Makefile
===================================================================
RCS file: /cvs/ports/audio/picard/Makefile,v
retrieving revision 1.15
diff -u -p -u -p -r1.15 Makefile
--- Makefile    10 Mar 2013 22:55:05 -0000      1.15
+++ Makefile    23 Feb 2014 17:00:45 -0000
@@ -5,6 +5,8 @@ COMMENT =               automatic audio files tagger 
 MODPY_EGG_VERSION =    0.16
 DISTNAME =             picard-${MODPY_EGG_VERSION}
 
+REVISION =             0
+
 CATEGORIES =           audio
 
 HOMEPAGE =             http://musicbrainz.org/doc/Picard_Tagger
Index: patches/patch-picard_musicdns_avcodec_c
===================================================================
RCS file: patches/patch-picard_musicdns_avcodec_c
diff -N patches/patch-picard_musicdns_avcodec_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-picard_musicdns_avcodec_c     23 Feb 2014 17:00:45 -0000
@@ -0,0 +1,24 @@
+$OpenBSD$
+
+Unbreak picard following ffmpeg's API changes
+
+--- picard/musicdns/avcodec.c.orig     Sun Feb 23 17:42:08 2014
++++ picard/musicdns/avcodec.c  Sun Feb 23 17:45:03 2014
+@@ -55,7 +55,7 @@ done(PyObject *self, PyObject *args)
+ static PyObject *
+ decode(PyObject *self, PyObject *args)
+ {
+-    AVFormatContext *format_context;
++    AVFormatContext *format_context = NULL;
+     AVCodecContext *codec_context;
+     AVCodec *codec;
+     PyObject *filename;
+@@ -69,7 +69,7 @@ decode(PyObject *self, PyObject *args)
+         return NULL;
+ 
+     Py_UNBLOCK_THREADS
+-    if (av_open_input_file(&format_context, PyString_AS_STRING(filename), 
NULL, 0, NULL) != 0) {
++    if (avformat_open_input(&format_context, PyString_AS_STRING(filename), 
NULL, NULL) != 0) {
+         Py_BLOCK_THREADS
+         PyErr_SetString(PyExc_Exception, "Couldn't open the file.");
+         return NULL;

Reply via email to