[FFmpeg-devel] Audio decoding in api-example.c broken?
Sun May 23 19:45:51 CEST 2010
libavcodec/api-example.c seems to be broken regarding audio decoding,
since SVN rev 9144, 27th May 2007. api-example.c reads a fixed buffer
size from the file, and then decodes a number of frames from the read
buffer, but the last frame is incomplete (since the input buffer size
isn't aligned with the compressed frame size). This gives a decode error
for the last audio frame, which is incomplete, exiting the whole test
Before rev 9144, the mp2 decoder consumed the whole input buffer at once,
so the approach in api-example.c worked fine.
Michael, any suggestion on how this should be handled? Should the audio
frames be written to file with some kind of simplistic framing/container
format? Or does the mp2 decoder handle being fed with incomplete frames,
and we should just adjust the error handling in api-example?
More information about the ffmpeg-devel