[FFmpeg-devel] [PATCH] G.729 initialization routine (skeleton)
Diego Biurrun
diego
Tue Jun 9 18:32:38 CEST 2009
On Tue, Jun 09, 2009 at 11:30:17PM +0700, Vladimir Voroshilov wrote:
> 2009/6/9 Michael Niedermayer <michaelni at gmx.at>:
> > On Sun, Jun 07, 2009 at 12:28:37AM +0700, Vladimir Voroshilov wrote:
> >> + ? ?if (avctx->sample_rate == 8000) {
> >> + ? ? ? ?ctx->subframe_size = 40;
> >> +#ifdef G729_SUPPORT_4400
> >> + ? ?} else if (avctx->sample_rate == 4400) {
> >> + ? ? ? ?ctx->subframe_size = 44;
> >> +#endif
> >> + ? ?} else {
> >> + ? ? ? ?av_log(avctx, AV_LOG_ERROR, "Sample rate %d is not supported.\n", avctx->sample_rate);
> >> + ? ? ? ?return AVERROR_NOFMT;
> >> + ? ?}
> >
> > ? ?ctx->subframe_size = 40;
> > #ifdef G729_SUPPORT_4400
> > ? ?if (avctx->sample_rate == 4400) {
> > ? ? ? ?ctx->subframe_size = 44;
> > ? ?}
> > #endif
>
> In this casse you'll get garbage sound instead of meanfull error
> message for unsupported g.729 modes.
How? It looks like a purely syntactical change to me. You could also
drop the {}.
Diego
More information about the ffmpeg-devel
mailing list