Don Moir <donmoir@...> writes: > >> A simple seek to zero is quick, but if I have to wait on > >> avcodec_decode_video2 to return, then its slower and can > >> be quite slow. > > > > Yes, this is exactly what CODEC_FLAG2_SHOW_ALL is for.
> CODEC_FLAG2_SHOW_ALL ///< Show all frames before the first > keyframe > > So show garbage? What does that have to do with how fast > avcodec_decode_video2 returns? >From a purely technical point-of-view, one could probably argue that CODEC_FLAG2_SHOW_ALL only affects how fast avcodec_decode_video2() returns. Once you have verified this solves the performance problem you see (remember that as explained on irc, nobody understands your reports), you can worry about the "garbage": Either it is possible to call the decode function as often as necessary (I am not sure) or it will be trivial to add such a return flag compared to the callback you suggest. I agree with you that multi-threading may not help in your use case because of its large overhead. Carl Eugen _______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
