Mercurial > libavcodec.hg
comparison ac3dec.c @ 7625:da9353cd6d71 libavcodec
get data size based on the actual data array instead of coding-in the calculation
author | jbr |
---|---|
date | Wed, 20 Aug 2008 00:15:27 +0000 |
parents | 545305ba44a0 |
children | 8618fb5d9bce |
comparison
equal
deleted
inserted
replaced
7624:545305ba44a0 | 7625:da9353cd6d71 |
---|---|
655 /** | 655 /** |
656 * Upmix delay samples from stereo to original channel layout. | 656 * Upmix delay samples from stereo to original channel layout. |
657 */ | 657 */ |
658 static void ac3_upmix_delay(AC3DecodeContext *s) | 658 static void ac3_upmix_delay(AC3DecodeContext *s) |
659 { | 659 { |
660 int channel_data_size = 128*sizeof(float); | 660 int channel_data_size = sizeof(s->delay[0]); |
661 switch(s->channel_mode) { | 661 switch(s->channel_mode) { |
662 case AC3_CHMODE_DUALMONO: | 662 case AC3_CHMODE_DUALMONO: |
663 case AC3_CHMODE_STEREO: | 663 case AC3_CHMODE_STEREO: |
664 /* upmix mono to stereo */ | 664 /* upmix mono to stereo */ |
665 memcpy(s->delay[1], s->delay[0], channel_data_size); | 665 memcpy(s->delay[1], s->delay[0], channel_data_size); |