[vlc-devel] [PATCH 01/12] decoder: add decoder_OnOutputReady

Rémi Denis-Courmont remi at remlab.net
Tue Sep 8 16:58:49 CEST 2015


Le 2015-09-08 17:41, Thomas Guillem a écrit :
>> We need to dedicated fmt_out to one, the other, or neither, but not 
>> both.
>> (My
>> personal preference would be neither, as it is unambiguous, but it 
>> is
>> also the
>> most disruptive to the code base.)
>
> I have some questions about fmt_out change. If it changes a new vout 
> is
> created, right ?

Currently, yes.

> In that case,  what happen to the previous vout

Currently, it gets destroyed.

> and the pictures attached to it ?

Currently, any remaining picture is forcefully released by 
picture_pool_Reset() when the vout is destroyed. This is an old 
work-around for buggy decoders that leak picture references (libmpeg2?). 
Unfortunately, that leads to use-after-free for non-buggy yet 
asynchronous decoders (such as threaded libavcodec).

> Are they displayed with the previous vout or are they dropped ?

If it has not already crashed due to use-after-free by that point, the 
decoder will pass the old picture to the new vout, which will probably 
crash as well.

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


More information about the vlc-devel mailing list