[FFmpeg-devel] problem with block level audio decoding on a that is not streaming
Brett Tiplitz
btiplitz at gmail.com
Wed Mar 8 22:32:18 EET 2017
I've tried to update my code from avcodec_decode_audio4 to the new
avcodec_send_packet. I've got a block of data to decode, so this is not a
streaming design.
1. When I pass a big block of data to the interface, the time required to
process the buffer goes from 1.5s to 30s.
2. When I try and pass data to the system block by block, (or bunches of
blocks), the block size has to be a multiple of the underlying packet
size. Otherwise, the decoder discards the incomplete packet.
3. I also tried to detect when the buffer was getting low and add data to
the buffer, but it appears that this additional data was ignored.
I tried specifically the instructions on https://blogs.gentoo.org/lu_
zero/2016/03/29/new-avcodec-api/ but this exhibits the same behavior, where
an odd block size is discarded so I loose the blocks using this exact
approach unless the block size sent is a multiple of the frame size.
I looks to be like the new method works well for streaming, but not so well
for non streaming decoding.
More information about the ffmpeg-devel
mailing list