[Ffmpeg-devel] [PATCH] avctx->frame_size/channels/sample_rate fix for AMR
Benjamin Larsson
banan
Thu Sep 14 14:40:57 CEST 2006
Andrew Voznytsa skrev:
> Hi,
>
> I think it is obvious.
>
>
> ------------------------------------------------------------------------
>
> Index: libavcodec/amr.c
> ===================================================================
> --- libavcodec/amr.c (revision 6250)
> +++ libavcodec/amr.c (working copy)
> @@ -143,6 +143,11 @@
> av_log(avctx, AV_LOG_ERROR, "Speech_Decode_Frame_init error\n");
> return -1;
> }
> +
> + avctx->sample_rate = 8000;
> + avctx->channels = 1;
> + avctx->frame_size = 160;
> +
> return 0;
> }
>
> @@ -345,6 +350,11 @@
> av_log(avctx, AV_LOG_ERROR, "Decoder_Interface_init error\r\n");
> return -1;
> }
> +
> + avctx->sample_rate = 8000;
> + avctx->channels = 1;
> + avctx->frame_size = 160;
> +
> return 0;
> }
>
> @@ -596,6 +606,11 @@
> AMRWBContext *s = (AMRWBContext *)avctx->priv_data;
> s->frameCount=0;
> s->state = D_IF_init();
> +
> + avctx->sample_rate = 16000;
> + avctx->channels = 1;
> + avctx->frame_size=320;
> +
> return 0;
> }
>
Patch looks ok at first sight.
MvH
Benjamin Larsson
More information about the ffmpeg-devel
mailing list