comparison parser.c @ 1987:d9e067853051 libavcodec

>2 channels decoding fix
author michael
date Thu, 29 Apr 2004 03:33:34 +0000
parents f5af91b8be17
children b5753525f9a8
comparison
equal deleted inserted replaced
1986:c8e866f4515f 1987:d9e067853051
875 s->inbuf_ptr--; 875 s->inbuf_ptr--;
876 } else { 876 } else {
877 s->frame_size = len; 877 s->frame_size = len;
878 /* update codec info */ 878 /* update codec info */
879 avctx->sample_rate = sample_rate; 879 avctx->sample_rate = sample_rate;
880 avctx->channels = ac3_channels[s->flags & 7]; 880 /* set channels,except if the user explicitly requests 1 or 2 channels, XXX/FIXME this is a bit ugly */
881 if (s->flags & A52_LFE) 881 if(avctx->channels!=1 && avctx->channels!=2){
882 avctx->channels++; 882 avctx->channels = ac3_channels[s->flags & 7];
883 if (s->flags & A52_LFE)
884 avctx->channels++;
885 }
883 avctx->bit_rate = bit_rate; 886 avctx->bit_rate = bit_rate;
884 avctx->frame_size = 6 * 256; 887 avctx->frame_size = 6 * 256;
885 } 888 }
886 } 889 }
887 } else if (len < s->frame_size) { 890 } else if (len < s->frame_size) {