amarok/amarok-2.8.0-ffmpeg-3.0.patch

86 lines
3.6 KiB
Diff

diff --git a/src/musicbrainz/MusicDNSAudioDecoder.cpp b/src/musicbrainz/MusicDNSAudioDecoder.cpp
index 6216e5ce26cc3461b89aea560943ad7a79101af9..65a92fb43811d0cbdde5e2442880496b3417da68 100644
--- a/src/musicbrainz/MusicDNSAudioDecoder.cpp
+++ b/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();
}