kdemultimedia (4:4.8.4-2) libav_compat.diff

Summary

 ffmpegthumbs/ffmpegthumbnailer/moviedecoder.cpp |    4 ++++
 1 file changed, 4 insertions(+)

    
download this patch

Patch contents

Author: Pino Toscano <pino@debian.org>
Description: Fix compilation with libav >= 0.7
 Use CODEC_TYPE_VIDEO or AVMEDIA_TYPE_VIDEO depending on the version of
 libavcodec.
Last-Update: 2011-09-03
Forwarded: no
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=638241

--- a/ffmpegthumbs/ffmpegthumbnailer/moviedecoder.cpp
+++ b/ffmpegthumbs/ffmpegthumbnailer/moviedecoder.cpp
@@ -122,7 +122,11 @@
 void MovieDecoder::initializeVideo()
 {
     for (unsigned int i = 0; i < m_pFormatContext->nb_streams; i++) {
+#if LIBAVCODEC_VERSION_MAJOR < 53
+        if (m_pFormatContext->streams[i]->codec->codec_type == CODEC_TYPE_VIDEO) {
+#else
         if (m_pFormatContext->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
+#endif
             m_pVideoStream = m_pFormatContext->streams[i];
             m_VideoStream = i;
             break;