comparison adpcm.c @ 2028:141a9539e270 libavcodec

data_size = 0 cleanup
author michael
date Fri, 21 May 2004 14:37:16 +0000
parents 39ad6cd5d4a6
children 2b75dff01118
comparison
equal deleted inserted replaced
2027:3a78447c3b53 2028:141a9539e270
566 } 566 }
567 567
568 if(st) { /* handle stereo interlacing */ 568 if(st) { /* handle stereo interlacing */
569 c->channel = (channel + 1) % 2; /* we get one packet for left, then one for right data */ 569 c->channel = (channel + 1) % 2; /* we get one packet for left, then one for right data */
570 if(channel == 1) { /* wait for the other packet before outputing anything */ 570 if(channel == 1) { /* wait for the other packet before outputing anything */
571 *data_size = 0;
572 return src - buf; 571 return src - buf;
573 } 572 }
574 } 573 }
575 break; 574 break;
576 case CODEC_ID_ADPCM_IMA_WAV: 575 case CODEC_ID_ADPCM_IMA_WAV:
840 (*src >> 4) & 0x0F, 3); 839 (*src >> 4) & 0x0F, 3);
841 src++; 840 src++;
842 } 841 }
843 break; 842 break;
844 default: 843 default:
845 *data_size = 0;
846 return -1; 844 return -1;
847 } 845 }
848 *data_size = (uint8_t *)samples - (uint8_t *)data; 846 *data_size = (uint8_t *)samples - (uint8_t *)data;
849 return src - buf; 847 return src - buf;
850 } 848 }