[FFmpeg-cvslog] r15583 - trunk/libavformat/dv.c
romansh
subversion
Tue Oct 7 18:14:33 CEST 2008
Author: romansh
Date: Tue Oct 7 18:14:33 2008
New Revision: 15583
Log:
simplifying code as per Michael's suggestion
Modified:
trunk/libavformat/dv.c
Modified: trunk/libavformat/dv.c
==============================================================================
--- trunk/libavformat/dv.c (original)
+++ trunk/libavformat/dv.c Tue Oct 7 18:14:33 2008
@@ -201,10 +201,9 @@ static int dv_extract_audio_info(DVDemux
quant = as_pack[4] & 0x07; /* 0 - 16bit linear, 1 - 12bit nonlinear */
/* note: ach counts PAIRS of channels (i.e. stereo channels) */
- if (stype == 3) {
- ach = 4;
- } else
- ach = (stype == 2 || (quant && (freq == 2))) ? 2 : 1;
+ ach = (int[4]){ 1, 0, 2, 4}[stype];
+ if (ach == 1 && quant && freq == 2)
+ ach = 2;
/* Dynamic handling of the audio streams in DV */
for (i=0; i<ach; i++) {
More information about the ffmpeg-cvslog
mailing list