comparison libspeexdec.c @ 10124:691a0e5585a0 libavcodec

libspeex: Do not set AVCodecContext.frame_size in decoder init if there is no header in extradata since the default value will be incorrect for multiple frames per packet.
author jbr
date Fri, 04 Sep 2009 00:57:20 +0000
parents 6cade2cdd63b
children 8a4984c5cacc
comparison
equal deleted inserted replaced
10123:e1bd75a1eab2 10124:691a0e5585a0
76 av_log(avctx, AV_LOG_ERROR, "Error initializing libspeex decoder.\n"); 76 av_log(avctx, AV_LOG_ERROR, "Error initializing libspeex decoder.\n");
77 return -1; 77 return -1;
78 } 78 }
79 79
80 if (!s->header) { 80 if (!s->header) {
81 speex_decoder_ctl(s->dec_state, SPEEX_GET_FRAME_SIZE, &avctx->frame_size); 81 speex_decoder_ctl(s->dec_state, SPEEX_GET_FRAME_SIZE, &s->frame_size);
82 s->frame_size = avctx->frame_size;
83 } 82 }
84 83
85 if (avctx->channels == 2) { 84 if (avctx->channels == 2) {
86 SpeexCallback callback; 85 SpeexCallback callback;
87 callback.callback_id = SPEEX_INBAND_STEREO; 86 callback.callback_id = SPEEX_INBAND_STEREO;