<div dir="ltr">What do you mean by "waiting"?<div>If you're calling this api on a different thread, why can't you terminate the thread?</div><div>If you're calling it from your main thread, there's nothing your app can do until the function returns, unless they implement some callbacks in the middle of the execution.</div>
<div><br></div><div>Best of luck!</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Dec 16, 2013 at 8:48 AM, Don Moir <span dir="ltr"><<a href="mailto:donmoir@comcast.net" target="_blank">donmoir@comcast.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
----- Original Message ----- From: "Carl Eugen Hoyos" <<a href="mailto:cehoyos@ag.or.at" target="_blank">cehoyos@ag.or.at</a>><br>
To: <<a href="mailto:libav-user@ffmpeg.org" target="_blank">libav-user@ffmpeg.org</a>><br>
Sent: Tuesday, December 31, 2013 4:08 AM<div class="im"><br>
Subject: Re: [Libav-user]any way to interrupt avcodec_decode_video2 ?<br>
<br>
<br>
</div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Don Moir <donmoir@...> writes:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Since app is timeline oriented, trying to keep seek time<br>
down to minimum and if avcodec_decode_video2 has been<br>
called, seems there is no way out until its finished<br>
and this decoding time can delay a new seek attempt.<br>
</blockquote>
<br>
Are you looking for CODEC_FLAG2_SHOW_ALL?<br>
<br>
Carl Eugen<br>
</blockquote>
<br></div>
No. I can easily check between calls to avcodec_decode_video2 but once its called you are stuck until it returns. Would be nice to be able to interrupt it for quicker seeking and to end 'the' video more quickly. Doesn't matter too much for a simple player app, but I have things on timelines and also video coming and going quicky. Things are time corrected to a timeline but the more I can reduce impact from things like this the better off we are.<br>

<br>
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. I don't mean finish as in the flag (gotframe) to avcodec_decode_video2, but just waiting on it to return period.<div class="HOEnZb">
<div class="h5"><br>
<br>
______________________________<u></u>_________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/<u></u>listinfo/libav-user</a><br>
</div></div></blockquote></div><br></div>