riff: do not add empty metadata tags in INFO chunk

This commit is contained in:
Justin Ruggles 2012-11-25 12:40:54 -05:00
parent 3c370f5abc
commit 259d8c5647

View File

@ -734,6 +734,12 @@ int ff_read_riff_info(AVFormatContext *s, int64_t size)
chunk_size += (chunk_size & 1); chunk_size += (chunk_size & 1);
if (!chunk_code) {
if (chunk_size)
avio_skip(pb, chunk_size);
continue;
}
value = av_malloc(chunk_size + 1); value = av_malloc(chunk_size + 1);
if (!value) { if (!value) {
av_log(s, AV_LOG_ERROR, "out of memory, unable to read INFO tag\n"); av_log(s, AV_LOG_ERROR, "out of memory, unable to read INFO tag\n");