提交 7fcbebbe 编写于 作者: E Eduard Sinelnikov 提交者: Michael Niedermayer

avformat/aiffdec: AIFF fix in case of ANNO

Apple's AIFF protocol clearly states that each chucnk which is odd sized a padding should be added.
In the old version of aiffdec adding of padding was done in `get_meta`. And in case of unknown chunk name it was done in defalut case.
The new version has deleted the padding in default case and added padding adding after the switch.
But the new version didn't removed the padding adding in the `get_meta` function so in some cases padding was added twice which leaded to a bug.

Fixes: sample.aiff
Signed-off-by: NMichael Niedermayer <michael@niedermayer.cc>
上级 526a87b4
......@@ -81,11 +81,10 @@ static void get_meta(AVFormatContext *s, const char *key, int size)
av_free(str);
return;
}
size += (size&1)-res;
size -= res;
str[res] = 0;
av_dict_set(&s->metadata, key, str, AV_DICT_DONT_STRDUP_VAL);
}else
size+= size&1;
}
avio_skip(s->pb, size);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册