Hi,

     I am trying raw aac encoding/decoding now, like this
pcm --(libav audio encode)--> aac --(libav audio decode2)--> pcm
(all data in memory buffer, no file saving, no aac file parsing)
the encoding is OK, but the decoding is failed.

I am using ffmpeg source version 0.5.

And I found a method in old posts,

A   AVCodec* codec = avcodec_find_decoder(CODEC_ID_AAC); //successfully
AVCodecContext *c = avcodec_alloc_context(); //successfully
unsigned char extradata[] = {0x15, 0x88}; //main feature!!!
c->extradata = extradata;
c->extradata_size = sizeof(extradata);
avcodec_open(c, codec); //successfully!!!

I also set c->channels, c->sample_rate, c->and sample_fmt.
But it is not work for me,  report error "[aac @ 0x91badc0]channel element
1.0 is not allocated"
I guess the problem is the extradata, but I don't know how to get the right
value,
Or I missed something important? Or anyone could tell me where I can find
the clue?

Thanks a lot.

R.C
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to