<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 2018-12-14 10:47 a.m., Carl Eugen
Hoyos wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAB0OVGo70Sgyi2qBFfG5t2ULcOgqQYUFJ-NRFqX1tr6K3JTskg@mail.gmail.com">
<pre class="moz-quote-pre" wrap="">2018-12-14 15:57 GMT+01:00, drwho <a class="moz-txt-link-rfc2396E" href="mailto:drwho@infidigm.net"><drwho@infidigm.net></a>:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">(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
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">frame. (it is set before decoding the first frame for mp3)
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
The frame size for mp3 is known, for flac it has to be determined.
Are you using the flac parser in your code?</pre>
</blockquote>
I'm not sure if I am using the flac parser. I am using
av_read_frame() and avcoder_decode_audio4() in a similar fashion to
<a moz-do-not-send="true"
href="https://ffmpeg.org/doxygen/3.3/demuxing_decoding_8c-example.html#a93">this
example</a>. As a work around, if frame_size is still zero after
a few frames are decoded, I look at nb_samples in the frame.
</body>
</html>