diff --git a/libavformat/metadata.c b/libavformat/metadata.c index 8a25782f29..5c7ef06199 100644 --- a/libavformat/metadata.c +++ b/libavformat/metadata.c @@ -84,7 +84,7 @@ int av_metadata_set(AVMetadata **pm, AVMetadataTag elem) #define FILL_METADATA_INT(s, key) { \ char number[10]; \ snprintf(number, sizeof(number), "%d", s->key); \ - FILL_METADATA(s, key, number) } + if(s->key) FILL_METADATA(s, key, number) } void ff_metadata_sync_compat(AVFormatContext *ctx) {