> My problem is that from time to time my decode or frame copying gets behind > and if it gets too far behind I end up with a "circular buffer overrun" error > and it bombs out. What I want to be able to do is determine WHEN I'm getting > behind in decoding and so take the option of dropping some frames to catch > up. I only have I and P frames in my stream, so as long as I don't drop an I > frame I should be ok. However, I don't see a way of determining how many > frames are stored in the circular buffer and so whether I am behind or not. > > Is there a means of determining how full the buffer is?
Not through the standard APIs, as implementations of FIFOs within input modules vary depending on the input. In my case (which is the UDP source), I added instrumentation to libavformat/udp.c which once a second calls av_fifo_space(s->fifo) and reports it back to my application. This allows me to continuously track whether the FIFO is getting backlogged (common if the pipeline is falling behind realtime), and take action before hitting the overflow condition. Devin -- Devin J. Heitmueller - Kernel Labs http://www.kernellabs.com _______________________________________________ Libav-user mailing list Libav-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/libav-user To unsubscribe, visit link above, or email libav-user-requ...@ffmpeg.org with subject "unsubscribe".