aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2010-07-01 15:03:21 +0000
committerAurelien Jacobs <aurel@gnuage.org>2010-07-01 15:03:21 +0000
commit383b25fd5478e7760bec0d87ed95ff862398cb46 (patch)
treed4e455aab6021c12fab9ffbe257d7e814ca0ac3a /libavformat
parent5935f9d6bd5902131d964a677516cf149bb08b48 (diff)
downloadffmpeg-383b25fd5478e7760bec0d87ed95ff862398cb46.tar.gz
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 Originally committed as revision 23936 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/metadata_compat.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/metadata_compat.c b/libavformat/metadata_compat.c
index ac99c05c60..26d22242e8 100644
--- a/libavformat/metadata_compat.c
+++ b/libavformat/metadata_compat.c
@@ -108,10 +108,11 @@ void ff_metadata_demux_compat(AVFormatContext *ctx)
#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); \