[Ffmpeg-devel] Some PCM codecs incosistent wrt avcodec_encode_audio()

Vagelis Savvas vagy
Sun Apr 16 13:01:48 CEST 2006

Some PCM encoders (MULAW, ALAW, etc), due to their non-variable  
compression (?)
encode samples in a loop in their encode routine, until the input buffer
is filled, typically consuming many frame_size(=1) chunks of input data in  
each run.

The said encode routine is called by avcodec_encode_audio(...),
which then increases avctx->frame_number++, something not equal
to the count of frames the encoder routine actually produced

Obviously, a quick workaround would be to add something like
avctx->frame_number += frames_encoded - 1
in the PCM's encode function,  but that smells like an ugly hack,
plus I am not familiar enough with libavcodec.
Has somebody that can judge the situation anything to comment?

Keep up the excellent work!



http://www.freemail.gr - ?????? ???????? ???????????? ????????????.
http://www.freemail.gr - free email service for the Greek-speaking.

More information about the ffmpeg-devel mailing list