Commit 0f03282a authored by gpoirier's avatar gpoirier

allow amr bitrate to be changed "on the fly" through avctx->bitrate.

Patch by Martin % marthi A graphics P cs P uni - sb P de %
Original thread:
date: Nov 20, 2006 6:20 PM	 
subject: Re: [Ffmpeg-devel] [PATCH] Re: AMR bitrate 


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@7139 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 8a968d7e
......@@ -482,6 +482,8 @@ static int amr_nb_encode_frame(AVCodecContext *avctx,
AMRContext *s = (AMRContext*)avctx->priv_data;
int written;
s->enc_bitrate=getBitrateMode(avctx->bit_rate);
written = Encoder_Interface_Encode(s->enstate,
s->enc_bitrate,
data,
......@@ -624,7 +626,9 @@ static int amr_wb_encode_frame(AVCodecContext *avctx,
unsigned char *frame/*out*/, int buf_size, void *data/*in*/)
{
AMRWBContext *s = (AMRWBContext*) avctx->priv_data;
int size = E_IF_encode(s->state, s->mode, data, frame, s->allow_dtx);
int size;
s->mode=getWBBitrateMode(avctx->bit_rate);
size = E_IF_encode(s->state, s->mode, data, frame, s->allow_dtx);
return size;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment