[vlc-devel] [PATCH 3/5] enable select the 2nd subtitle
Denis Charmet
typx at dinauz.org
Wed Sep 23 18:29:57 CEST 2015
Hi,
Le mercredi 23 septembre 2015 à 04:18:02, Aaron Wang a écrit :
> ---
> include/vlc_es.h | 1 +
> src/input/es_out.c | 717 +++++++++++++++++++++++++++++++++++------------------
> src/input/event.c | 11 +-
> src/input/event.h | 2 +-
> src/input/input.c | 20 +-
> 5 files changed, 495 insertions(+), 256 deletions(-)
>
> diff --git a/include/vlc_es.h b/include/vlc_es.h
> index 97cdb78..5644b75 100644
> --- a/include/vlc_es.h
> +++ b/include/vlc_es.h
> @@ -363,6 +363,7 @@ struct subs_format_t
> } teletext;
>
> text_style_t *p_style; /* Default styles to use */
> + int i_ord; /*if a 2nd 3rd .. subtitle*/
> };
>
> /**
> diff --git a/src/input/es_out.c b/src/input/es_out.c
> index 2443316..2f1884c 100644
> --- a/src/input/es_out.c
> +++ b/src/input/es_out.c
> @@ -90,8 +90,8 @@ struct es_out_id_t
> char *psz_language;
> char *psz_language_code;
>
> - decoder_t *p_dec;
> - decoder_t *p_dec_record;
> + decoder_t *p_dec[2];
> + decoder_t *p_dec_record[2];
I'm sorry but I really can't agree with this and all that derives of it.
You are playing possibly two different es you really shouldn't put both of
them in the same es_out_id_t.
Each time your demux adds an es it calls EsOutAdd which will return a
unique es_out_id_t so each es should have its own.
This force a lot of code duplication and honestly waaaaay too hackish
for the core in my opinion.
Regards.
--
Denis Charmet - TypX
Le mauvais esprit est un art de vivre
More information about the vlc-devel
mailing list