Commit 259879d3 authored by Paul B Mahol's avatar Paul B Mahol

avformat/nistspheredec: fix silly bug

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 1490682b
...@@ -112,7 +112,7 @@ static int nist_read_header(AVFormatContext *s) ...@@ -112,7 +112,7 @@ static int nist_read_header(AVFormatContext *s)
sscanf(buffer, "%*s %*s %"SCNd32, &st->codec->bits_per_coded_sample); sscanf(buffer, "%*s %*s %"SCNd32, &st->codec->bits_per_coded_sample);
} else { } else {
char key[32], value[32]; char key[32], value[32];
if (sscanf(buffer, "%31s %*s %31s", key, value) == 3) { if (sscanf(buffer, "%31s %*s %31s", key, value) == 2) {
av_dict_set(&s->metadata, key, value, AV_DICT_APPEND); av_dict_set(&s->metadata, key, value, AV_DICT_APPEND);
} else { } else {
av_log(s, AV_LOG_ERROR, "Failed to parse '%s' as metadata\n", buffer); av_log(s, AV_LOG_ERROR, "Failed to parse '%s' as metadata\n", buffer);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment