[FFmpeg-cvslog] r23936 - trunk/libavformat/metadata_compat.c

aurel subversion
Thu Jul 1 17:03:21 CEST 2010


Author: aurel
Date: Thu Jul  1 17:03:21 2010
New Revision: 23936

Log:
fix warning in ff_metadata_mux_compat()
warning: the address of 'number' will always evaluate as 'true'
patch by Eli Friedman   eli _dot_ friedman _at_ gmail _dot_ com

Modified:
   trunk/libavformat/metadata_compat.c

Modified: trunk/libavformat/metadata_compat.c
==============================================================================
--- trunk/libavformat/metadata_compat.c	Thu Jul  1 16:49:32 2010	(r23935)
+++ trunk/libavformat/metadata_compat.c	Thu Jul  1 17:03:21 2010	(r23936)
@@ -108,10 +108,11 @@ void ff_metadata_demux_compat(AVFormatCo
 
 
 #define FILL_METADATA(s, key, value) {                                        \
-    if (value && *value && !av_metadata_get(s->metadata, #key, NULL, 0))      \
+    if (!av_metadata_get(s->metadata, #key, NULL, 0))                         \
         av_metadata_set2(&s->metadata, #key, value, 0);                       \
     }
-#define FILL_METADATA_STR(s, key)  FILL_METADATA(s, key, s->key)
+#define FILL_METADATA_STR(s, key) {                                           \
+    if (s->key && *s->key)  FILL_METADATA(s, key, s->key); }
 #define FILL_METADATA_INT(s, key) {                                           \
     char number[10];                                                          \
     snprintf(number, sizeof(number), "%d", s->key);                           \



More information about the ffmpeg-cvslog mailing list