<div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jul 12, 2018 at 12:39 PM Peter Bennett <<a href="mailto:pb.mythtv@gmail.com">pb.mythtv@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF">
<p><br>
</p>
<br>
<div class="m_-5752863664751650624moz-cite-prefix">On 07/11/2018 03:16 PM, David Engel
wrote:<br>
</div>
<blockquote type="cite">
<pre>I tried using yesterday's patch to watch the World Cup last night and
some other stuff. I had to abandon that when playback got very
stuttery and I didn't have time to debug. I suspect your sledge
hammer was getting used repeatedly. I tried again later and it
happened again and then went away. It didn't happen on my other
shield, but I didn't test with it much.</pre>
</blockquote></div><div text="#000000" bgcolor="#FFFFFF">
Was this in normal playback, time stretch or fast forward? AFAIK the
IllegalStateException that the sledge hammer handles only happens in
fast forward or occasionally in skip/jump. (i.e. when flush is
used).</div><div text="#000000" bgcolor="#FFFFFF"><br>
<blockquote type="cite">
<pre></pre>
<blockquote type="cite" style="color:#000000">
<pre>I suppose I need to dig into the FFmpeg source code and figure out the
IllegalStateException and find the correct FFmpeg fix.
</pre>
</blockquote>
</blockquote></div><div text="#000000" bgcolor="#FFFFFF">
According to mediacodec documentation, IllegalStateException only
happens on dequeue output if the decoder is not executing or it is
in asynchronous mode.<br>
<br>
It is not in asynchronous mode or dequeue output would never work.<br>
<br>
The ways it can stop executing are if you call "stop" or "reset" or
"release" it. In ffmpeg there is a "stop" routine but it is never
called, and there is no reset routine. It seems that there is no
way to get into a non-executing state. Prehaps it is in an error
state. Unfortunately there is no native API that will tell you the
state.<br>
<br>
It seems that this may be a bug in mediacodec on the shield. I don't
know how much I should do to try and work around it. I have tried
reordering calls and adding a stop and start after the flush, but
nothing has helped.</div></blockquote><div dir="auto"><br></div><div dir="auto">FWIW I am not able to reproduce this issue with mpv-android. Are you maybe calling ffmpeg APIs from different native threads?</div><div dir="auto"><br></div><div dir="auto">Aman </div><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF"></div><div text="#000000" bgcolor="#FFFFFF"><br>
<blockquote type="cite">
<pre>FYI, this might be related.
<a class="m_-5752863664751650624moz-txt-link-freetext" href="https://forums.geforce.com/default/topic/1056259/shield-tv/shield-experience-upgrade-7-0/post/5834167/#5834167" target="_blank">https://forums.geforce.com/default/topic/1056259/shield-tv/shield-experience-upgrade-7-0/post/5834167/#5834167</a>
. Kodi doesn't use ffmpeg (AFAIK) for MediaCodec. I don't know about
Plex.
</pre>
</blockquote>
<br></div><div text="#000000" bgcolor="#FFFFFF">
Perhaps I need to report this to NVidia</div><div text="#000000" bgcolor="#FFFFFF"><br>
<br>
Peter<br>
</div></blockquote></div></div>