Commit 39401931 authored by Francois Cartegnie's avatar Francois Cartegnie

es_format: allow codecs to override spu styles

parent 84d7b276
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#define VLC_ES_H 1 #define VLC_ES_H 1
#include <vlc_fourcc.h> #include <vlc_fourcc.h>
#include <vlc_text_style.h>
/** /**
* \file * \file
...@@ -356,6 +357,8 @@ struct subs_format_t ...@@ -356,6 +357,8 @@ struct subs_format_t
int i_magazine; int i_magazine;
int i_page; int i_page;
} teletext; } teletext;
text_style_t *p_style; /* Default styles to use */
}; };
/** /**
......
...@@ -475,6 +475,7 @@ int es_format_Copy( es_format_t *dst, const es_format_t *src ) ...@@ -475,6 +475,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.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 ) if( src->video.p_palette )
{ {
...@@ -523,6 +524,8 @@ void es_format_Clean( es_format_t *fmt ) ...@@ -523,6 +524,8 @@ void es_format_Clean( es_format_t *fmt )
free( fmt->video.p_palette ); free( fmt->video.p_palette );
free( fmt->subs.psz_encoding ); 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 ) if( fmt->i_extra_languages > 0 && fmt->p_extra_languages )
{ {
int i; int i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment