aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mmsh.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2010-09-29 15:43:36 +0000
committerRonald S. Bultje <rsbultje@gmail.com>2010-09-29 15:43:36 +0000
commit3dedbeff7b74d7820b4395c87614edfa8e688fa4 (patch)
tree4522e09a9880bb6b3b4b1b210f06b4a5d53ab221 /libavformat/mmsh.c
parent329d689f7563bd0da3e7fc8493756cb2185ed088 (diff)
downloadffmpeg-3dedbeff7b74d7820b4395c87614edfa8e688fa4.tar.gz
Check return value of get_chunk_header(). Since enum can be unsigned, the
current code wouldn't always error out on errors. Based on patch by Stephen d'Angelo <sdangelo evertz com>. Originally committed as revision 25260 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mmsh.c')
-rw-r--r--libavformat/mmsh.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/mmsh.c b/libavformat/mmsh.c
index dbbaab6466..3581431c25 100644
--- a/libavformat/mmsh.c
+++ b/libavformat/mmsh.c
@@ -147,9 +147,9 @@ static int get_http_header_data(MMSHContext *mmsh)
for (;;) {
len = 0;
- chunk_type = get_chunk_header(mmsh, &len);
- if (chunk_type < 0) {
- return chunk_type;
+ res = chunk_type = get_chunk_header(mmsh, &len);
+ if (res < 0) {
+ return res;
} else if (chunk_type == CHUNK_TYPE_ASF_HEADER){
// get asf header and stored it
if (!mms->header_parsed) {