s->first_frame = 1;
static int MP3lame_encode_init(AVCodecContext *avctx){	Mp3AudioContext *s = avctx->priv_data;	if (avctx->channels > 2)		return -1;	s->first_frame = 1;	s->stereo = avctx->channels > 1 ? 1 : 0;	if ((s->gfp = lame_init()) == NULL)		goto err;	lame_set_in_samplerate(s->gfp, avctx->sample_rate);	lame_set_out_samplerate(s->gfp, avctx->sample_rate);	lame_set_num_channels(s->gfp, avctx->channels);	/* lame 3.91 dies on quality != 5 */	lame_set_quality(s->gfp, 5);	/* lame 3.91 doesn't work in mono */	lame_set_mode(s->gfp, JOINT_STEREO);	lame_set_brate(s->gfp, avctx->bit_rate/1000);	if (lame_init_params(s->gfp) < 0)		goto err_close;	avctx->frame_size = MPA_FRAME_SIZE;	avctx->key_frame = 1;	return 0;err_close:	lame_close(s->gfp);err:	return -1;}