--- a/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
+++ b/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
@@ -99,7 +99,11 @@
     }
 
     // analyze the streams
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,3,0)
+    ::avformat_find_stream_info( d->formatContext, 0 );
+#else
     ::av_find_stream_info( d->formatContext );
+#endif
 
     // we only handle files containing one audio stream
     if( d->formatContext->nb_streams != 1 ) {
@@ -133,7 +137,12 @@
 
     // open the codec on our context
     kDebug() << "(K3bFFMpegFile) found codec for " << m_filename;
-    if( ::avcodec_open( codecContext, d->codec ) < 0 ) {
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53,6,0)
+    err = ::avcodec_open2( codecContext, d->codec, 0 );
+#else
+    err = ::avcodec_open( codecContext, d->codec );
+#endif
+    if( err < 0 ) {
         kDebug() << "(K3bFFMpegDecoderFactory) could not open codec.";
         return false;
     }
