Skip to content

Commit

Permalink
media-sound/amarok: fix build with ffmpeg 3, bug #601800
Browse files Browse the repository at this point in the history
Package-Manager: portage-2.3.3
  • Loading branch information
aballier committed Dec 7, 2016
1 parent 7994528 commit 9b74e71
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
1 change: 1 addition & 0 deletions media-sound/amarok/amarok-2.8.90-r2.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ PATCHES=(
"${FILESDIR}/${P}-mysqld-rpath.patch"
"${FILESDIR}/${P}-scriptconsole.patch"
"${FILESDIR}/${P}-gcc6.patch"
"${FILESDIR}/${P}-ffmpeg3.patch"
)

src_configure() {
Expand Down
58 changes: 58 additions & 0 deletions media-sound/amarok/files/amarok-2.8.90-ffmpeg3.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
Index: amarok-2.8.90/src/musicbrainz/MusicDNSAudioDecoder.cpp
===================================================================
--- amarok-2.8.90.orig/src/musicbrainz/MusicDNSAudioDecoder.cpp
+++ amarok-2.8.90/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 );
@@ -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 );
@@ -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 );

0 comments on commit 9b74e71

Please sign in to comment.