Hi Mike,
Will do. The writeAudioFrame is:
AVCodecContext *c;
AVPacket pkt;
av_init_packet(&pkt);
c = this->audio_st->codec;
pkt.size= avcodec_encode_audio(c, this->audio_outbuf, this->audio_outbuf_size,
(const short*)this->samples);
pkt.pts= av_rescale_q(c->coded_frame->pts, c->time_base, this
->audio_st->time_base);
pkt.flags |= PKT_FLAG_KEY;
pkt.stream_index= this->audio_st->index;
pkt.data= audio_outbuf;
/* write the compressed frame in the media file */
if (av_write_frame(this->oc, &pkt) != 0) {
return false;
}
return true;
Thanks
Andy
On Tue, May 26, 2009 at 12:03 AM, Michael <[email protected]> wrote:
> I'd recommend that you take a look at ffmpeg.c It doesn't look like you're
> using a FIFO for your audio, but I'd need to see what writeAudioFrame()
> looks like.
>
> Best,
>
> Mike
> _______________________________________________
> libav-user mailing list
> [email protected]
> https://lists.mplayerhq.hu/mailman/listinfo/libav-user
>
--
Andy Bell
CTO
J2K Video Limited
T: +44 (0)20 8133 2473
M: +34 685 130097
E: [email protected]
W: www.j2kvideo.com
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user