[FFmpeg-soc] [soc]: r5904 - mms/mmsh.c

spyfeng subversion at mplayerhq.hu
Thu Aug 12 19:16:27 CEST 2010


Author: spyfeng
Date: Thu Aug 12 19:16:26 2010
New Revision: 5904

Log:
simplify the code.

Modified:
   mms/mmsh.c

Modified: mms/mmsh.c
==============================================================================
--- mms/mmsh.c	Thu Aug 12 19:13:47 2010	(r5903)
+++ mms/mmsh.c	Thu Aug 12 19:16:26 2010	(r5904)
@@ -344,16 +344,10 @@ static int mmsh_read(URLContext *h, uint
         if (mms->asf_header_read_size < mms->asf_header_size) {
             // copy asf header into buffer
             res = ff_mms_read_header(mms, buf, size);
-        } else if (mms->remaining_in_len){
-            res = ff_mms_read_data(mms, buf, size);
         } else {
-             // read data packet from network
-            res = handle_chunk_type(mmsh);
-            if (res == 0) {
-                res = ff_mms_read_data(mms, buf, size);
-            } else {
-                dprintf(NULL, "other situation!\n");
-            }
+            if (!mms->remaining_in_len && (res = handle_chunk_type(mmsh)))
+                return res;
+            res = ff_mms_read_data(mms, buf, size);
         }
     }while(!res);
     return res;


More information about the FFmpeg-soc mailing list