All pastes #2085374 Raw Edit

Miscellany

public text v1 · immutable
#2085374 ·published 2011-09-29 21:35 UTC
rendered paste body
Index: libffmpegthumbnailer/moviedecoder.cpp
===================================================================
--- libffmpegthumbnailer/moviedecoder.cpp	(Revision 233)
+++ libffmpegthumbnailer/moviedecoder.cpp	(Revision 235)
@@ -130,7 +130,11 @@
 {
     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;