[Libav-user] frame_size in AVCodecContext is zero when decoding flac

Gonzalo Garramuno ggarra13 at gmail.com
Fri Dec 14 17:38:12 EET 2018


El vie., dic. 14, 2018 11:57, drwho <drwho at infidigm.net> escribió:

> Hello,
>
> (using libavcodec.so.57.64.101)
> It appears that the frame_size element in AVCodecContext is not
> guaranteed to be none zero either before or after decoding of the first
> frame.  (it is set before decoding the first frame for mp3)
>
> in loop after calling avcodec_decode_audio4()
> qDebug() << frame->nb_samples << codecContext->frame_size;
> output......
> 4608 0
> 4608 0
> 4608 0
> 4608 0
>
> Is this behavior normal or am I doing something wrong?


I believe the behavior is normal. The demuxer caches several frames before
returning a proper value (a proper frame).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20181214/49b5dda8/attachment.html>


More information about the Libav-user mailing list