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.
On Wed, Feb 15, 2017 at 2:24 AM, Marcelo Emmerich < marcelo.emmer...@gmail.com> wrote: > Hi All, > > I am refactoring a streaming application from manually resampling and FIFO > buffering audio to using filters. For testing I run the "filtering_audio.c > <https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/filtering_audio.c>" > example, however it does not work, I always get the error > > more samples than frame size (avcodec_encode_audio2) > > 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. > > What am I doing wrong? > > Thanks, > Marcelo > > > > _______________________________________________ > Libav-user mailing list > Libav-user@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/libav-user > >
_______________________________________________ Libav-user mailing list Libav-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user