comparison g729dec.c @ 11507:25e209f9153a libavcodec

Make g729dec.c:decoder_init() return AVERROR(EINVAL) rather than AVERROR(NOFMT) if one channel if the number of channels specified is different than 1.
author stefano
date Thu, 18 Mar 2010 00:23:02 +0000
parents 62705926ba33
children 892d04e7c4e5
comparison
equal deleted inserted replaced
11506:c7743bcad821 11507:25e209f9153a
169 G729Context* ctx = avctx->priv_data; 169 G729Context* ctx = avctx->priv_data;
170 int i,k; 170 int i,k;
171 171
172 if (avctx->channels != 1) { 172 if (avctx->channels != 1) {
173 av_log(avctx, AV_LOG_ERROR, "Only mono sound is supported (requested channels: %d).\n", avctx->channels); 173 av_log(avctx, AV_LOG_ERROR, "Only mono sound is supported (requested channels: %d).\n", avctx->channels);
174 return AVERROR_NOFMT; 174 return AVERROR(EINVAL);
175 } 175 }
176 176
177 /* Both 8kbit/s and 6.4kbit/s modes uses two subframes per frame. */ 177 /* Both 8kbit/s and 6.4kbit/s modes uses two subframes per frame. */
178 avctx->frame_size = SUBFRAME_SIZE << 1; 178 avctx->frame_size = SUBFRAME_SIZE << 1;
179 179