[FFmpeg-soc] [soc]: r5664 - mms/mmst.c

spyfeng subversion at mplayerhq.hu
Sat Mar 13 14:30:27 CET 2010


Author: spyfeng
Date: Sat Mar 13 14:30:26 2010
New Revision: 5664

Log:
simplify read_bytes().

Modified:
   mms/mmst.c

Modified: mms/mmst.c
==============================================================================
--- mms/mmst.c	Sat Mar 13 14:07:31 2010	(r5663)
+++ mms/mmst.c	Sat Mar 13 14:30:26 2010	(r5664)
@@ -324,19 +324,11 @@ static int read_bytes(MMSContext *mms, u
     while(len<length_to_read)
     {
         int read_result= url_read(mms->mms_hd, buffer+len, length_to_read-len);
-        if(read_result==0)
-        {
-            break;
-        }
-        else if(read_result<0)
+        if(read_result)
         {
-            // if we read something, we want to return up to that portion; if we didn't error out.
-            if(!len)
-                len= -1;
-            break;
-        } else {
             len+= read_result;
-        }
+        } else
+            return read_result;
     }
 
     return len;


More information about the FFmpeg-soc mailing list