<div dir="ltr">I have seen this kind of issues while rendering audio to ALSA but just re-sampled myself, not using filters. I think what you need to keep an eye on is how many bytes of raw data you are getting out of the decoder, and does that makes sense for the number of channels that you specified. If the filter is expecting n number of samples as inputs and the decoded buffer size is less, then obviously you will see this error. Just print all the values and see if they match. </div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 15, 2017 at 2:24 AM, Marcelo Emmerich <span dir="ltr"><<a href="mailto:marcelo.emmerich@gmail.com" target="_blank">marcelo.emmerich@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="color:rgb(0,0,0);font-size:16px;font-family:calibri,arial,helvetica,sans-serif;margin-top:0px;margin-bottom:0px">Hi All,</div><div style="color:rgb(0,0,0);font-size:16px;font-family:calibri,arial,helvetica,sans-serif;margin-top:0px;margin-bottom:0px"><br></div><div style="color:rgb(0,0,0);font-size:16px;font-family:calibri,arial,helvetica,sans-serif;margin-top:0px;margin-bottom:0px">I am refactoring a streaming application from manually resampling and FIFO buffering audio to using filters. For testing I run the "<a href="https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/filtering_audio.c" id="m_-5311814076125622127gmail-LPlnk958222" target="_blank"><span id="m_-5311814076125622127gmail-LPlnk958222">filtering_audio.c</span></a>" example, however it does not work, I always get the error </div><div style="color:rgb(0,0,0);font-size:16px;font-family:calibri,arial,helvetica,sans-serif;margin-top:0px;margin-bottom:0px"><br></div><div style="color:rgb(0,0,0);font-size:16px;font-family:calibri,arial,helvetica,sans-serif;margin-top:0px;margin-bottom:0px">more samples than frame size (avcodec_encode_audio2)<br></div><div style="color:rgb(0,0,0);font-size:16px;font-family:calibri,arial,helvetica,sans-serif;margin-top:0px;margin-bottom:0px"><br></div><div style="color:rgb(0,0,0);font-size:16px;font-family:calibri,arial,helvetica,sans-serif;margin-top:0px;margin-bottom:0px">In my previous implementation I had this working by manually filling a FIFO and handling the resampling myself, however I need to switch to using filters. The current filtergraph in filtering_audio.c actually has an auto-inserted fifo filter, but I still get the error.</div><div style="color:rgb(0,0,0);font-size:16px;font-family:calibri,arial,helvetica,sans-serif;margin-top:0px;margin-bottom:0px"><br></div><div style="color:rgb(0,0,0);font-size:16px;font-family:calibri,arial,helvetica,sans-serif;margin-top:0px;margin-bottom:0px">What am I doing wrong?</div><div style="color:rgb(0,0,0);font-size:16px;font-family:calibri,arial,helvetica,sans-serif;margin-top:0px;margin-bottom:0px"><br></div><div style="color:rgb(0,0,0);font-size:16px;font-family:calibri,arial,helvetica,sans-serif;margin-top:0px;margin-bottom:0px">Thanks,</div><div style="color:rgb(0,0,0);font-size:16px;font-family:calibri,arial,helvetica,sans-serif;margin-top:0px;margin-bottom:0px">Marcelo</div><div id="m_-5311814076125622127gmail-x_Signature" style="color:rgb(0,0,0);font-size:16px;font-family:calibri,arial,helvetica,sans-serif"><div id="m_-5311814076125622127gmail-x_divtagdefaultwrapper" style="font-family:calibri,arial,helvetica,sans-serif,"apple color emoji","segoe ui emoji",notocoloremoji,"segoe ui symbol","android emoji",emojisymbols,"apple color emoji","segoe ui emoji",notocoloremoji,"segoe ui symbol","android emoji",emojisymbols,"apple color emoji","segoe ui emoji",notocoloremoji,"segoe ui symbol","android emoji",emojisymbols"><font face="Calibri,Arial,Helvetica,sans-serif,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols"><span id="m_-5311814076125622127gmail-x_divtagdefaultwrapper"><div style="margin-top:0px;margin-bottom:0px"> </div><div><br></div></span></font></div></div><p style="margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);font-family:calibri,arial,helvetica,sans-serif,"apple color emoji","segoe ui emoji",notocoloremoji,"segoe ui symbol","android emoji",emojisymbols,"apple color emoji","segoe ui emoji",notocoloremoji,"segoe ui symbol","android emoji",emojisymbols;font-size:16px"></p><div id="m_-5311814076125622127gmail-x_Signature" style="color:rgb(0,0,0);font-family:calibri,arial,helvetica,sans-serif,"apple color emoji","segoe ui emoji",notocoloremoji,"segoe ui symbol","android emoji",emojisymbols,"apple color emoji","segoe ui emoji",notocoloremoji,"segoe ui symbol","android emoji",emojisymbols;font-size:16px"></div></div>
<br>______________________________<wbr>_________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">http://ffmpeg.org/mailman/<wbr>listinfo/libav-user</a><br>
<br></blockquote></div><br></div>