On Thu, 28 Aug 2014 16:42:50 -0400 Krishna <[email protected]> wrote:
> Thanks Markus and wm4. I gave your suggestion a shot and this is what I > did. In my situation, I call the decoder() and expect a frame. However, the > decoder will buffer several packets right in the beginning. Since I need a > single frame per call, I now keep track of the number of times it read > packets without decoding (in the beginning). I call this "numInitPackets". > > In the end I flush out that many packets using a null packet. And it > worked! Thank you so much for your help! > ah thank you. didnt know that one. but makes sense yes. You don't need a counter. Once you have no more packets, you start feeding the decoder null packets. And once the decoder doesn't return a new picture, even though you fed it a null packet, you know there are no more frames in the decoder. _______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
