[FFmpeg-cvslog] asfdec: Check the return value of asf_read_stream_properties
Martin Storsjö
git at videolan.org
Tue Oct 8 02:07:43 CEST 2013
ffmpeg | branch: release/1.1 | Martin Storsjö <martin at martin.st> | Sat Sep 28 23:32:57 2013 +0300| [fc4d11ec9b4c9710e2dac012d4ed0e7d08c6df7d] | committer: Luca Barbato
asfdec: Check the return value of asf_read_stream_properties
This makes sure errors in setting stream parameters are passed
on to the caller. This avoids successfully opening files while
some parameters aren't filled in properly.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org
Signed-off-by: Martin Storsjö <martin at martin.st>
(cherry picked from commit cc41167aede4c101ad17eeffa8f39bb6c23d3dad)
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fc4d11ec9b4c9710e2dac012d4ed0e7d08c6df7d
---
libavformat/asfdec.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index c6b322d..e8587af 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -714,7 +714,9 @@ static int asf_read_header(AVFormatContext *s)
if (ret < 0)
return ret;
} else if (!ff_guidcmp(&g, &ff_asf_stream_header)) {
- asf_read_stream_properties(s, gsize);
+ int ret = asf_read_stream_properties(s, gsize);
+ if (ret < 0)
+ return ret;
} else if (!ff_guidcmp(&g, &ff_asf_comment_header)) {
asf_read_content_desc(s, gsize);
} else if (!ff_guidcmp(&g, &ff_asf_language_guid)) {
More information about the ffmpeg-cvslog
mailing list