[Libav-user] any way to interrupt avcodec_decode_video2 ?
Carl Eugen Hoyos
cehoyos at ag.or.at
Wed Jan 1 21:01:25 CET 2014
Don Moir <donmoir at ...> 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
> 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
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.
More information about the Libav-user