Hi On Wed, Feb 14, 2007 at 03:29:23PM +0100, Michel Bardiaux wrote: [...]
// gsm.h miss some essential constants #define GSM_BLOCK_SIZE 33 +#define GSM_MS_BLOCK_SIZE 65 #define GSM_FRAME_SIZE 160
static int libgsm_init(AVCodecContext *avctx) { - if (avctx->channels > 1 || avctx->sample_rate != 8000) + if (avctx->channels > 1 || avctx->sample_rate != 8000 || avctx->bit_rate != 13000)
is 13000 exactly correct isnt it 13200 for CODEC_ID_GSM? [...]
@@ -356,6 +357,10 @@ put_le16(pb, 16); /* fwHeadFlags */ put_le32(pb, 0); /* dwPTSLow */ put_le32(pb, 0); /* dwPTSHigh */ + } else if (enc->codec_id == CODEC_ID_GSM_MS) { + put_le16(pb, 2); /* wav_extra_size */ + hdrsize += 2; + put_le16(pb, 320); /* wSamplesPerBlock */
isnt this simply avctx->frame_size ? i mean hardcoding 320 looks a little ugly unless its really needed ... [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I count him braver who overcomes his desires than him who conquers his enemies for the hardest victory is over self. -- Aristotle