# HG changeset patch # User romansh # Date 1223396073 0 # Node ID 3cc570fdebbf67b5b3676fa939d80d6e7223ab8a # Parent 9709530b68b55b122628be54ad4b1418642bd25e simplifying code as per Michael's suggestion diff -r 9709530b68b5 -r 3cc570fdebbf dv.c --- a/dv.c Tue Oct 07 15:49:45 2008 +0000 +++ b/dv.c Tue Oct 07 16:14:33 2008 +0000 @@ -201,10 +201,9 @@ 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