提交 317cfaa5 编写于 作者: A Alexandra Hájková 提交者: Luca Barbato

asfdec: prevent the memory leak in the asf_read_metada_obj

also do not return the error code but just break reading
metadata object in the case of the aspect ratio reading failure
Signed-off-by: NLuca Barbato <lu_zero@gentoo.org>
上级 58c3720a
......@@ -590,8 +590,10 @@ static int asf_read_metadata_obj(AVFormatContext *s, const GUIDParseTable *g)
buflen);
if (!strcmp(name, "AspectRatioX") || !strcmp(name, "AspectRatioY")) {
ret = asf_store_aspect_ratio(s, st_num, name, type);
if (ret < 0)
return ret;
if (ret < 0) {
av_freep(&name);
break;
}
} else {
if (st_num < ASF_MAX_STREAMS) {
if ((ret = process_metadata(s, name, name_len, val_len, type,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册