[vlc-devel] [Patch] Send an event when decoder creation failed
Laurent Aimar
fenrir at via.ecp.fr
Tue Jan 19 22:20:31 CET 2010
Hi,
On Tue, Jan 19, 2010, Hugo Beauzee-Luyssen wrote:
> At the moment there's no way of knowing an error has occured while
> trying to read a media.
> This patch allows a libvlc application to be notified by the
> libvlc_MediaPlayerEncounteredError event.
> +++ b/src/input/es_out.c
> @@ -1557,6 +1557,9 @@ static void EsCreateDecoder( es_out_t *out, es_out_id_t *p_es )
> input_DecoderStartBuffering( p_es->p_dec_record );
> }
> }
> + else
> + input_SendEventState( p_input, ERROR_S );
> +
It is not the right event for this kind of errors.
ERROR_S is a general input error that only src/input/input.c can emit
and only when the actual input_thread_t::"state" is changed to ERROR_S.
In es_out.c, the error is specific to one ES and may not be fatal for the
whole media.
Regards,
--
fenrir
More information about the vlc-devel
mailing list