<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">>     [libvorbis @ 028b1520] more samples than frame size<br>
> (avcodec_encode_audio2)<br>
<br>
Are you sure that you are encoding to flac?<br><br></blockquote><div><br></div><div>You were spot on. I was using "test.ogg"<span class="inbox-inbox-Apple-converted-space"> instead of </span><span style="line-height:1.5">"test.flac".</span><span class="inbox-inbox-Apple-converted-space" style="line-height:1.5"> </span></div><div><div><span style="color:rgb(33,33,33);font-family:"helvetica neue",helvetica,arial,sans-serif;font-size:13px"><br></span></div><div><span style="color:rgb(33,33,33);font-family:"helvetica neue",helvetica,arial,sans-serif">I made the following changes and now it works fine.</span></div><div><span style="color:rgb(33,33,33);font-family:"helvetica neue",helvetica,arial,sans-serif;font-size:13px">-        audio_decode_example("test.</span><span style="color:rgb(33,33,33);font-family:"helvetica neue",helvetica,arial,sans-serif;font-size:13px">ogg", "test.sdp");</span>  <br></div><div><span style="color:rgb(33,33,33);font-family:"helvetica neue",helvetica,arial,sans-serif;font-size:13px">+        audio_decode_example("test.flac</span><span style="color:rgb(33,33,33);font-family:"helvetica neue",helvetica,arial,sans-serif;font-size:13px">", "test.sdp");</span>  <br></div></div><div><br class="inbox-inbox-inbox-inbox-Apple-interchange-newline"><span style="font-size:13px;color:rgb(33,33,33);font-family:"helvetica neue",helvetica,arial,sans-serif">-        outCodecCtx->sample_fmt = AV_SAMPLE_FMT_FLTP;</span>   </div><div><font color="#212121" face="helvetica neue, helvetica, arial, sans-serif"><span style="line-height:1.5">+        outCodecCtx->sample_fmt = </span>AV_SAMPLE_FMT_S16<span style="line-height:1.5">;</span></font><span style="line-height:1.5">  </span> // FLAC uses fixed point samples<br></div><div><br></div><div>Thanks!</div><div><br></div></div></div>