[vlc-devel] [PATCH 2/5] es_format: allow codecs to override spu styles
Jean-Baptiste Kempf
jb at videolan.org
Mon Mar 24 11:06:33 CET 2014
LGTM
On 22 Mar, Francois Cartegnie wrote :
> ---
> include/vlc_es.h | 2 ++
> src/misc/es_format.c | 4 ++++
> 2 files changed, 6 insertions(+)
>
> diff --git a/include/vlc_es.h b/include/vlc_es.h
> index d7f2d94..52fa706 100644
> --- a/include/vlc_es.h
> +++ b/include/vlc_es.h
> @@ -356,6 +356,8 @@ struct subs_format_t
> int i_magazine;
> int i_page;
> } teletext;
> +
> + text_style_t *p_style; /* Default styles to use */
> };
>
> /**
> diff --git a/src/misc/es_format.c b/src/misc/es_format.c
> index 9028847..173e44f 100644
> --- a/src/misc/es_format.c
> +++ b/src/misc/es_format.c
> @@ -31,6 +31,7 @@
>
> #include <vlc_common.h>
> #include <vlc_es.h>
> +#include <vlc_text_style.h>
>
>
> /*****************************************************************************
> @@ -475,6 +476,7 @@ int es_format_Copy( es_format_t *dst, const es_format_t *src )
> }
>
> dst->subs.psz_encoding = dst->subs.psz_encoding ? strdup( src->subs.psz_encoding ) : NULL;
> + dst->subs.p_style = src->subs.p_style ? text_style_Duplicate( src->subs.p_style ) : NULL;
>
> if( src->video.p_palette )
> {
> @@ -523,6 +525,8 @@ void es_format_Clean( es_format_t *fmt )
> free( fmt->video.p_palette );
> free( fmt->subs.psz_encoding );
>
> + if ( fmt->subs.p_style ) text_style_Delete( fmt->subs.p_style );
> +
> if( fmt->i_extra_languages > 0 && fmt->p_extra_languages )
> {
> int i;
> --
> 1.8.5.3
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
--
With my kindest regards,
--
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
More information about the vlc-devel
mailing list