QTfrontend/util/LibavInteraction.cpp
changeset 8065 609d07b337b5
parent 7897 5e7c0810f365
child 8362 89a6b7cc6f95
--- a/QTfrontend/util/LibavInteraction.cpp	Mon Nov 19 02:48:21 2012 +0100
+++ b/QTfrontend/util/LibavInteraction.cpp	Mon Nov 19 03:29:41 2012 +0100
@@ -70,7 +70,7 @@
 
     // get list of all codecs
     AVCodec* pCodec = NULL;
-    while (pCodec = av_codec_next(pCodec))
+    while ((pCodec = av_codec_next(pCodec)))
     {
 #if LIBAVCODEC_VERSION_MAJOR >= 54
         if (!av_codec_is_encoder(pCodec))
@@ -162,7 +162,7 @@
 
     // get list of all formats
     AVOutputFormat* pFormat = NULL;
-    while (pFormat = av_oformat_next(pFormat))
+    while ((pFormat = av_oformat_next(pFormat)))
     {
         if (!pFormat->extensions)
             continue;
@@ -270,7 +270,7 @@
     QByteArray utf8path = filepath.toUtf8();
     if (avformat_open_input(&pContext, utf8path.data(), NULL, NULL) < 0)
         return "";
-#if LIBAVFORMAT_VERSION_MAJOR < 54
+#if LIBAVFORMAT_VERSION_MAJOR < 53
     if (av_find_stream_info(pContext) < 0)
 #else
     if (avformat_find_stream_info(pContext, NULL) < 0)
@@ -308,7 +308,7 @@
     AVDictionaryEntry* pComment = av_dict_get(pContext->metadata, "comment", NULL, 0);
     if (pComment)
         desc += QString("\n") + pComment->value;
-#if LIBAVFORMAT_VERSION_MAJOR < 54
+#if LIBAVFORMAT_VERSION_MAJOR < 53
     av_close_input_file(pContext);
 #else
     avformat_close_input(&pContext);