[FFmpeg-devel] libavcodec/flacenc: Possible bug

Hendrik Leppkes h.leppkes at gmail.com
Fri Jul 3 12:40:43 EEST 2020


On Fri, Jul 3, 2020 at 11:24 AM Olivier Ayache <olivier.ayache at gmail.com> wrote:
>
> I am currently working with FLAC encoder and I think I found a bug on pts
> setted on AVPacket.
> In  flac_encode_frame function the pts provided is frame's pts, if we feed
> the encoder with small frames, an encoded packet will be valid after
> several frames and the pts of the first packet won't be 0.
>

Encoders have a fixed frame size (avctx->frame_size), sending anything
but the correct number of audio samples to an encoder is not using it
correctly - unless it is specifically marked as variable frame size
(AV_CODEC_CAP_VARIABLE_FRAME_SIZE), which flacenc is not.

- Hendrik


More information about the ffmpeg-devel mailing list