[FFmpeg-devel] [PATCH] avcodec/gsmdec: reject unsupported msn audio modes

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Aug 13 23:00:07 CEST 2013


On Tue, Aug 13, 2013 at 10:46:21PM +0200, Piotr Bandurski wrote:
> 

> From 74f92249af153524e994b476a7efac18935bfeb9 Mon Sep 17 00:00:00 2001
> From: Piotr Bandurski <ami_stuff at o2.pl>
> Date: Tue, 13 Aug 2013 22:43:13 +0200
> Subject: [PATCH] avcodec/gsmdec: reject unsupported msn audio modes
> 
> ---
>  libavcodec/gsmdec.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/libavcodec/gsmdec.c b/libavcodec/gsmdec.c
> index dc64267..362e776 100644
> --- a/libavcodec/gsmdec.c
> +++ b/libavcodec/gsmdec.c
> @@ -34,6 +34,15 @@
>  
>  static av_cold int gsm_init(AVCodecContext *avctx)
>  {
> +    if (avctx->codec_tag == 0x0032) {
> +        if (avctx->bit_rate != 13000 &&
> +            avctx->bit_rate != 17912 &&
> +            avctx->bit_rate != 35824 &&
> +            avctx->bit_rate != 71656) {

Extreme nit level, but:
Wouldn't it be nicer as a single if?
Also: Do you have samples in case someone wants to make a patch?


More information about the ffmpeg-devel mailing list