aboutsummaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorrakuco <rakuco@FreeBSD.org>2016-12-06 01:48:57 +0800
committerrakuco <rakuco@FreeBSD.org>2016-12-06 01:48:57 +0800
commit3456f897493b39e0b5bec56425d56f9454a3995c (patch)
tree1a7525856bc6deb23a73b622bc479c89309c4dcc /audio
parent127a1a952571bf311392c04a41c8ebdcf51a7383 (diff)
downloadfreebsd-ports-gnome-3456f897493b39e0b5bec56425d56f9454a3995c.tar.gz
freebsd-ports-gnome-3456f897493b39e0b5bec56425d56f9454a3995c.tar.zst
freebsd-ports-gnome-3456f897493b39e0b5bec56425d56f9454a3995c.zip
Stop using deprecated FFMPEG calls in the code.
This allows the port to be built with the upcoming FFMPEG 3.x series while still maintaining compatibility with FFMPEG 2.x that is currently in the ports tree. I don't think PORTREVISION needs to be bumped here, as both the old and new calls exist in FFMPEG 2.x, and when FFMPEG 3 lands there will be a PORTREVISION bump anyway. PR: 214184 Submitted by: Matthey Rezny <matthew@reztek.cz>
Diffstat (limited to 'audio')
-rw-r--r--audio/amarok-kde4/files/patch-kde_rb-12668285
1 files changed, 85 insertions, 0 deletions
diff --git a/audio/amarok-kde4/files/patch-kde_rb-126682 b/audio/amarok-kde4/files/patch-kde_rb-126682
new file mode 100644
index 000000000000..65a3c27d9ecc
--- /dev/null
+++ b/audio/amarok-kde4/files/patch-kde_rb-126682
@@ -0,0 +1,85 @@
+# Fix build with FFmpeg 3.x; obtained from https://git.reviewboard.kde.org/r/126682
+#
+--- src/musicbrainz/MusicDNSAudioDecoder.cpp
++++ src/musicbrainz/MusicDNSAudioDecoder.cpp
+@@ -243,7 +243,7 @@ MusicDNSAudioDecoder::decode( const QString &fileName, DecodedAudioData *data, c
+ {
+ if( !decodedFrame )
+ {
+- decodedFrame = avcodec_alloc_frame();
++ decodedFrame = av_frame_alloc();
+ if( !decodedFrame )
+ {
+ warning() << "Unable to allocate enough memory to decode file.";
+@@ -251,7 +251,7 @@ MusicDNSAudioDecoder::decode( const QString &fileName, DecodedAudioData *data, c
+ break;
+ }
+ else
+- avcodec_get_frame_defaults( decodedFrame );
++ av_frame_unref( decodedFrame );
+ }
+
+ decoderRet = avcodec_decode_audio4( pCodecCtx, decodedFrame, &gotFrame, &avpkt );
+@@ -287,7 +287,7 @@ MusicDNSAudioDecoder::decode( const QString &fileName, DecodedAudioData *data, c
+
+ avcodec_close( pCodecCtx );
+ avformat_close_input( &pFormatCtx );
+- av_free( decodedFrame );
++ av_frame_free( &decodedFrame );
+
+ return data->duration();
+ }
+@@ -361,7 +361,7 @@ MusicDNSAudioDecoder::decode( const QString &fileName, DecodedAudioData *data, c
+ {
+ if( !decodedFrame )
+ {
+- decodedFrame = avcodec_alloc_frame();
++ decodedFrame = av_frame_alloc();
+ if( !decodedFrame )
+ {
+ warning() << "Unable to allocate enough memory to decode file.";
+@@ -369,7 +369,7 @@ MusicDNSAudioDecoder::decode( const QString &fileName, DecodedAudioData *data, c
+ break;
+ }
+ else
+- avcodec_get_frame_defaults( decodedFrame );
++ av_frame_unref( decodedFrame );
+ }
+
+ decoderRet = avcodec_decode_audio4( pCodecCtx, decodedFrame, &gotFrame, &avpkt );
+@@ -405,7 +405,7 @@ MusicDNSAudioDecoder::decode( const QString &fileName, DecodedAudioData *data, c
+
+ avcodec_close( pCodecCtx );
+ avformat_close_input( &pFormatCtx );
+- av_free( decodedFrame );
++ av_frame_free( &decodedFrame );
+
+ return data->duration();
+ }
+@@ -479,7 +479,7 @@ MusicDNSAudioDecoder::decode( const QString &fileName, DecodedAudioData *data, c
+ {
+ if( !decodedFrame )
+ {
+- decodedFrame = avcodec_alloc_frame();
++ decodedFrame = av_frame_alloc();
+ if( !decodedFrame )
+ {
+ warning() << "Unable to allocate enough memory to decode file.";
+@@ -487,7 +487,7 @@ MusicDNSAudioDecoder::decode( const QString &fileName, DecodedAudioData *data, c
+ break;
+ }
+ else
+- avcodec_get_frame_defaults( decodedFrame );
++ av_frame_unref( decodedFrame );
+ }
+
+ decoderRet = avcodec_decode_audio4( pCodecCtx, decodedFrame, &gotFrame, &avpkt );
+@@ -523,7 +523,7 @@ MusicDNSAudioDecoder::decode( const QString &fileName, DecodedAudioData *data, c
+
+ avcodec_close( pCodecCtx );
+ av_close_input_file( pFormatCtx );
+- av_free( decodedFrame );
++ av_frame_free( &decodedFrame );
+
+ return data->duration();
+ }