[vlc-devel] [RFC PATCH] mediacodec: fix a deadlock when seeking on pause

Rémi Denis-Courmont remi at remlab.net
Wed Oct 29 10:50:43 CET 2014


Le 2014-10-28 19:01, Thomas Guillem a écrit :
> MediaCodec with direct rendering can be stuck waiting for an input
> buffer when video is paused. Indeed, input buffers availability
> depends on output buffers.

Then you should queue the input blocks from VLC in a FIFO and dequeue 
them in a separate thread that waits for input buffers.

The current decoder interface might inhibit dequeuing output buffers 
asynchronously because it requires returning decoded pictures from the 
decode callback. But that problem should not affect input buffers.

> When the video is paused, output buffers are not released or
> displayed anymore, therefore, no more input buffers are available.

I am an idiot and a jerk so I fail to see how pause is any special.
I would think that if you get deadlocks on pause, you will also get 
deadlocks on any sufficiently slow frame rate or irregular frame 
interval.
In other words, I suspect that the real problem is just being moved 
from pause to slow, after it was moved from stop to pause.

-- 
Rémi Denis-Courmont



More information about the vlc-devel mailing list