[vlc-devel] [RFC PATCH] decoder: fix a "restart module" regression
Rémi Denis-Courmont
remi at remlab.net
Wed Sep 16 17:54:47 CEST 2015
Le 2015-09-16 18:44, Thomas Guillem a écrit :
> In a previous commit, when a module is restarted, I decided to drain
> the module
> by calling DecoderDecodeAudio( p_dec, NULL ) or DecoderDecodeVideo(
> p_dec, NULL
> ).
>
> There is an issue with mpeg_audio: pf_decode will return a block, and
> aout_update_format will try to create an aout with a zeroed fmt_out,
> it will
> fail and p_dec->b_error will be true.
>
> There is a lot of way to fix this issue:
>
> 1/ reset b_error to false when restarting a module.
>
> 2/ Don't call DecoderDecodeAudio( p_dec, NULL ) or
> DecoderDecodeVideo( p_dec,
> NULL ) if there is no previous block decoded.
>
> 3/ fix each modules to not return a invalid block when drained.
>
> I would go for 1 and 3.
Seems reasonable. I hope it does not create live loops on real errors
though.
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list