[FFmpeg-cvslog] r25260 - trunk/libavformat/mmsh.c

rbultje subversion
Wed Sep 29 17:43:37 CEST 2010


Author: rbultje
Date: Wed Sep 29 17:43:36 2010
New Revision: 25260

Log:
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>.

Modified:
   trunk/libavformat/mmsh.c

Modified: trunk/libavformat/mmsh.c
==============================================================================
--- trunk/libavformat/mmsh.c	Wed Sep 29 17:34:43 2010	(r25259)
+++ trunk/libavformat/mmsh.c	Wed Sep 29 17:43:36 2010	(r25260)
@@ -147,9 +147,9 @@ static int get_http_header_data(MMSHCont
 
     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) {



More information about the ffmpeg-cvslog mailing list