[MPlayer-cvslog] r37803 - trunk/libmpcodecs/ad_mpg123.c

reimar subversion at mplayerhq.hu
Fri Feb 26 19:14:02 CET 2016


Author: reimar
Date: Fri Feb 26 19:14:02 2016
New Revision: 37803

Log:
ad_mpg123: minor code simplification.

Modified:
   trunk/libmpcodecs/ad_mpg123.c

Modified: trunk/libmpcodecs/ad_mpg123.c
==============================================================================
--- trunk/libmpcodecs/ad_mpg123.c	Thu Feb 25 23:39:17 2016	(r37802)
+++ trunk/libmpcodecs/ad_mpg123.c	Fri Feb 26 19:14:02 2016	(r37803)
@@ -293,6 +293,11 @@ static int decode_a_bit(sh_audio_t *sh,
         if(con->new_format)
             ret = set_format(sh, con);
 
+        /* Theoretically, mpg123 could return MPG123_DONE, so be prepared.
+         * Should not happen in our usage, but it is a valid return code. */
+        if (ret == MPG123_ERR || ret == MPG123_DONE)
+            break;
+
         /* Feed the decoder. This will only fire from the second round on. */
         if (ret == MPG123_NEED_MORE) {
             int incount;
@@ -328,10 +333,6 @@ static int decode_a_bit(sh_audio_t *sh,
                 ret = set_format(sh, con);
             }
         }
-        /* Theoretically, mpg123 could return MPG123_DONE, so be prepared.
-         * Should not happen in our usage, but it is a valid return code. */
-        else if (ret == MPG123_ERR || ret == MPG123_DONE)
-            break;
 
         /* Try to decode a bit. This is the return value that counts
          * for the loop condition. */


More information about the MPlayer-cvslog mailing list