changeset 36640:e648bb154916

ad_dvdpcm: simplify/clarify code.
author reimar
date Sat, 25 Jan 2014 16:55:08 +0000
parents f42155eac256
children 598ef7d90b78
files libmpcodecs/ad_dvdpcm.c
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/ad_dvdpcm.c	Sat Jan 25 16:55:07 2014 +0000
+++ b/libmpcodecs/ad_dvdpcm.c	Sat Jan 25 16:55:08 2014 +0000
@@ -51,6 +51,7 @@
 	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 @@
 	  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: