On Tue, Apr 29, 2008 at 02:46:52PM +0200, Michel Bardiaux wrote: [...]
Index: libavcodec/libgsm.c =================================================================== --- libavcodec/libgsm.c (revision 13005) +++ libavcodec/libgsm.c (working copy) @@ -41,9 +41,18 @@ avctx->channels); return -1; } + + if(avctx->codec->decode){ + if(!avctx->channels) + avctx->channels= 1; + + if(!avctx->sample_rate) + avctx->sample_rate= 8000; + }else{ if (avctx->sample_rate != 8000) { av_log(avctx, AV_LOG_ERROR, "Sample rate 8000Hz required for GSM, got %dHz\n", avctx->sample_rate); + if(avctx->strict_std_compliance > FF_COMPLIANCE_INOFFICIAL) return -1; } if (avctx->bit_rate != 13000 /* Official */ && @@ -51,8 +60,10 @@ avctx->bit_rate != 0 /* Unknown; a.o. mov does not set bitrate when decoding */ ) { av_log(avctx, AV_LOG_ERROR, "Bitrate 13000bps required for GSM, got %dbps\n", avctx->bit_rate); + if(avctx->strict_std_compliance > FF_COMPLIANCE_INOFFICIAL) return -1; } + }
avctx->priv_data = gsm_create();
Maybe switch on codecID: 0 and 13200 for GSM, 0 and 13000 for GSM MS?
I agree that this would be a good idea if i wasnt that lazy ...
But I can do that later. So, OK for me. assuming a patch that results in incorrect identation is OK, I suppose you will follow with a correction?)
Applied, and indention fixed in subsequent patch. [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I have never wished to cater to the crowd; for what I know they do not approve, and what they approve I do not know. -- Epicurus