[Libav-user] AC3 -> LPCM -> MPEG2 PES

Pavel Sokolov pavel at sokolov.me
Tue Feb 28 17:52:32 CET 2012



24.02.2012 18:12, Andrey Utkin пишет:
>> I need to get LPCM data from ac3, to add it later to MPEG2 PES packet.
>> >  I'm using "avcodec_decode_audio4" to decode ac3 packet.
>> >  In which format the resulting AVFrame structure stores data?
> The decoded audio data format can be checked in AVFrame.format, and
> also AVCodecContext.sample_fmt. For audio, check it with enum
> AVSampleFormat. Sample rate is in AVCodecContext.sample_rate.
>
AVFrame.format is always -1 after avcodec_decode_audio4.
Is it bug?

-- 

With best regards, Pavel A. Sokolov
mobile: +7(921)419-1819
skype: pavel_a_sokolov



More information about the Libav-user mailing list