[vlc-devel] [PATCH] decoder: flush the vout before flushing the decoder

Rémi Denis-Courmont remi at remlab.net
Wed Dec 2 23:15:56 CET 2015


On Wednesday 02 December 2015 10:09:43 Thomas Guillem wrote:
> Yes, avcodec_flush_buffers() waits for pending get_buffer() to return.

Then the only possibility is to make get_buffer2() fail using a transient 
level trigger. That has some implications on how libavcodec would handle 
get_buffer2() failures, which are not currently explicit and official, if at 
all supported.

But...

> I'm out of ideas right now, can we discuss it this week-end?

I still don´t really understand the point of this patch. The exit deadlock 
should be fixed, and the remaining mwait() issue does not affect video (and 
has a separate patch).

Historically, VLC has lamely recycle still-in-use picture buffers when it ran 
out before exit. If that happened now (post libavcodec "evil plan one"), it 
would lead to crashes. And regardless, if you have a problem with libavcodec-
MT, then vlc-devel is probably not the most appropriate venue, nor will the 
next VideoLAN plenary be.

(IMHO, libavcodec needs a *proper* thread/asynchronous decoding discussion 
including the key "consumers" such as mpv, VLC and LAV filters, but that does 
not belong on vlc-devel.)

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list