[vlc-commits] es_format: allow codecs to override spu styles
Francois Cartegnie
git at videolan.org
Tue Mar 25 17:40:19 CET 2014
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Mar 21 07:51:29 2014 +0100| [39401931218b00bc2a24794c4543fc286adffa62] | committer: Francois Cartegnie
es_format: allow codecs to override spu styles
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=39401931218b00bc2a24794c4543fc286adffa62
---
include/vlc_es.h | 3 +++
src/misc/es_format.c | 3 +++
2 files changed, 6 insertions(+)
diff --git a/include/vlc_es.h b/include/vlc_es.h
index d7f2d94..b7cc4a9 100644
--- a/include/vlc_es.h
+++ b/include/vlc_es.h
@@ -25,6 +25,7 @@
#define VLC_ES_H 1
#include <vlc_fourcc.h>
+#include <vlc_text_style.h>
/**
* \file
@@ -356,6 +357,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..0b948cf 100644
--- a/src/misc/es_format.c
+++ b/src/misc/es_format.c
@@ -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.p_style = src->subs.p_style ? text_style_Duplicate( src->subs.p_style ) : NULL;
if( src->video.p_palette )
{
@@ -523,6 +524,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;
More information about the vlc-commits
mailing list