<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr">El vie., dic. 14, 2018 11:57, drwho <<a href="mailto:drwho@infidigm.net">drwho@infidigm.net</a>> escribió:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
(using libavcodec.so.57.64.101)<br>
It appears that the frame_size element in AVCodecContext is not <br>
guaranteed to be none zero either before or after decoding of the first <br>
frame.  (it is set before decoding the first frame for mp3)<br>
<br>
in loop after calling avcodec_decode_audio4()<br>
qDebug() << frame->nb_samples << codecContext->frame_size;<br>
output......<br>
4608 0<br>
4608 0<br>
4608 0<br>
4608 0<br>
<br>
Is this behavior normal or am I doing something wrong?</blockquote></div></div><div dir="auto"><br></div><div dir="auto">I believe the behavior is normal. The demuxer caches several frames before returning a proper value (a proper frame).</div></div>