Package: amarok
Version: 2.8.0-3
Severity: important
Tags: patch
User: pkg-multimedia-maintain...@lists.alioth.debian.org
Usertags: ffmpeg2.9

Dear Maintainer,

your package fails to build with the upcoming ffmpeg 2.9.
This bug will become release-critical at some point when the
ffmpeg2.9 transition gets closer.

Attached is a patch replacing the deprecated functionality.
It also works with ffmpeg 2.8.
Please apply this patch and forward it upstream, if necessary.

These changes have little regression potential.

Best regards,
Andreas

diff --git a/debian/patches/ffmpeg_2.9.patch b/debian/patches/ffmpeg_2.9.patch
new file mode 100644
index 0000000..aee4e1c
--- /dev/null
+++ b/debian/patches/ffmpeg_2.9.patch
@@ -0,0 +1,87 @@
+Description: Replace deprecated FFmpeg API
+Author: Andreas Cadhalpun <andreas.cadhal...@googlemail.com>
+Last-Update: <2015-11-02>
+
+--- amarok-2.8.0.orig/src/musicbrainz/MusicDNSAudioDecoder.cpp
++++ amarok-2.8.0/src/musicbrainz/MusicDNSAudioDecoder.cpp
+@@ -223,7 +223,7 @@ MusicDNSAudioDecoder::decode( const QStr
+             {
+                 if( !decodedFrame )
+                 {
+-                    decodedFrame = avcodec_alloc_frame();
++                    decodedFrame = av_frame_alloc();
+                     if( !decodedFrame )
+                     {
+                         warning() << "Unable to allocate enough memory to decode file.";
+@@ -231,7 +231,7 @@ MusicDNSAudioDecoder::decode( const QStr
+                         break;
+                     }
+                     else
+-                        avcodec_get_frame_defaults( decodedFrame );
++                        av_frame_unref( decodedFrame );
+                 }
+ 
+                 decoderRet = avcodec_decode_audio4( pCodecCtx, decodedFrame, &gotFrame, &avpkt );
+@@ -267,7 +267,7 @@ MusicDNSAudioDecoder::decode( const QStr
+ 
+     avcodec_close( pCodecCtx );
+     avformat_close_input( &pFormatCtx );
+-    av_free( decodedFrame );
++    av_frame_free( &decodedFrame );
+ 
+     return data->duration();
+ }
+@@ -341,7 +341,7 @@ MusicDNSAudioDecoder::decode( const QStr
+             {
+                 if( !decodedFrame )
+                 {
+-                    decodedFrame = avcodec_alloc_frame();
++                    decodedFrame = av_frame_alloc();
+                     if( !decodedFrame )
+                     {
+                         warning() << "Unable to allocate enough memory to decode file.";
+@@ -349,7 +349,7 @@ MusicDNSAudioDecoder::decode( const QStr
+                         break;
+                     }
+                     else
+-                        avcodec_get_frame_defaults( decodedFrame );
++                        av_frame_unref( decodedFrame );
+                 }
+ 
+                 decoderRet = avcodec_decode_audio4( pCodecCtx, decodedFrame, &gotFrame, &avpkt );
+@@ -385,7 +385,7 @@ MusicDNSAudioDecoder::decode( const QStr
+ 
+     avcodec_close( pCodecCtx );
+     avformat_close_input( &pFormatCtx );
+-    av_free( decodedFrame );
++    av_frame_free( &decodedFrame );
+ 
+     return data->duration();
+ }
+@@ -459,7 +459,7 @@ MusicDNSAudioDecoder::decode( const QStr
+             {
+                 if( !decodedFrame )
+                 {
+-                    decodedFrame = avcodec_alloc_frame();
++                    decodedFrame = av_frame_alloc();
+                     if( !decodedFrame )
+                     {
+                         warning() << "Unable to allocate enough memory to decode file.";
+@@ -467,7 +467,7 @@ MusicDNSAudioDecoder::decode( const QStr
+                         break;
+                     }
+                     else
+-                        avcodec_get_frame_defaults( decodedFrame );
++                        av_frame_unref( decodedFrame );
+                 }
+ 
+                 decoderRet = avcodec_decode_audio4( pCodecCtx, decodedFrame, &gotFrame, &avpkt );
+@@ -503,7 +503,7 @@ MusicDNSAudioDecoder::decode( const QStr
+ 
+     avcodec_close( pCodecCtx );
+     av_close_input_file( pFormatCtx );
+-    av_free( decodedFrame );
++    av_frame_free( &decodedFrame );
+ 
+     return data->duration();
+ }
diff --git a/debian/patches/series b/debian/patches/series
index 74320d5..605d3d8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@ debian_mysqle_force_defaults_file.diff
 debian_find_mysql_fix.diff
 debian_clamz_is_runtime_dependency.diff
 valgrind_uninitialized_value
+ffmpeg_2.9.patch
_______________________________________________
pkg-kde-extras mailing list
pkg-kde-extras@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-kde-extras

Reply via email to