[MPlayer-cvslog] r36736 - trunk/libmpcodecs/ad_dvdpcm.c

reimar subversion at mplayerhq.hu
Sat Jan 25 17:55:08 CET 2014


Author: reimar
Date: Sat Jan 25 17:55:08 2014
New Revision: 36736

Log:
ad_dvdpcm: simplify/clarify code.

Modified:
   trunk/libmpcodecs/ad_dvdpcm.c

Modified: trunk/libmpcodecs/ad_dvdpcm.c
==============================================================================
--- trunk/libmpcodecs/ad_dvdpcm.c	Sat Jan 25 17:55:07 2014	(r36735)
+++ trunk/libmpcodecs/ad_dvdpcm.c	Sat Jan 25 17:55:08 2014	(r36736)
@@ -51,6 +51,7 @@ static int init(sh_audio_t *sh)
 	case 3: sh->samplerate=32000;break;
 	}
 	switch ((h >> 6) & 3) {
+	  default:
 	  case 0:
 	    sh->sample_format = AF_FORMAT_S16_BE;
 	    sh->samplesize = 2;
@@ -58,13 +59,11 @@ static int init(sh_audio_t *sh)
 	  case 1:
 	    mp_msg(MSGT_DECAUDIO, MSGL_INFO, MSGTR_SamplesWanted);
 	    sh->i_bps = sh->channels * sh->samplerate * 5 / 2;
+	    /* Fallthrough, 20 bit will be output as 24 bit */
 	  case 2:
 	    sh->sample_format = AF_FORMAT_S24_BE;
 	    sh->samplesize = 3;
 	    break;
-	  default:
-	    sh->sample_format = AF_FORMAT_S16_BE;
-	    sh->samplesize = 2;
 	}
     } else {
 	// use defaults:


More information about the MPlayer-cvslog mailing list