fix frontend for ffmpeg 0.7.13
authorStepan777 <stepik-777@mail.ru>
Sat, 07 Jul 2012 17:43:10 +0400
changeset 7361 b73d7688dadc
parent 7359 8bb4da06b065
child 7363 09af8bc9181f
fix frontend for ffmpeg 0.7.13
QTfrontend/util/libav_iteraction.cpp
--- a/QTfrontend/util/libav_iteraction.cpp	Sat Jul 07 17:26:20 2012 +0400
+++ b/QTfrontend/util/libav_iteraction.cpp	Sat Jul 07 17:43:10 2012 +0400
@@ -288,7 +288,11 @@
     QByteArray utf8path = filepath.toUtf8();
     if (avformat_open_input(&pContext, utf8path.data(), NULL, NULL) < 0)
         return "";
+#if LIBAFORMAT_VERSION_MAJOR < 54
+    if (av_find_stream_info(pContext) < 0)
+#else
     if (avformat_find_stream_info(pContext, NULL) < 0)
+#endif
         return "";
 
     int s = float(pContext->duration)/AV_TIME_BASE;
@@ -322,7 +326,7 @@
     AVDictionaryEntry* pComment = av_dict_get(pContext->metadata, "comment", NULL, 0);
     if (pComment)
         desc += QString("\n") + pComment->value;
-#if LIBAVCODEC_VERSION_MAJOR < 54
+#if LIBAFORMAT_VERSION_MAJOR < 54
     av_close_input_file(pContext);
 #else
     avformat_close_input(&pContext);