[vlc-devel] [PATCH] ttml: correct region style resolution order and process region referential styling
Remita Amine
remitamine at gmail.com
Sat May 20 20:51:55 CEST 2017
---
modules/codec/ttml/substtml.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/modules/codec/ttml/substtml.c b/modules/codec/ttml/substtml.c
index ec9bd327d2..9e87e1e90b 100644
--- a/modules/codec/ttml/substtml.c
+++ b/modules/codec/ttml/substtml.c
@@ -438,7 +438,13 @@ static void DictMergeWithRegionID( ttml_context_t *p_ctx, const char *psz_id,
if( !p_regionnode )
return;
- /* First fill with style elements */
+ DictionaryMerge( &p_regionnode->attr_dict, p_dst );
+
+ const char *psz_styleid = (const char *)
+ vlc_dictionary_value_for_key( &p_regionnode->attr_dict, "style" );
+ if( psz_styleid )
+ DictMergeWithStyleID( p_ctx, psz_styleid, p_dst );
+
for( const tt_basenode_t *p_child = p_regionnode->p_child;
p_child; p_child = p_child->p_next )
{
@@ -451,9 +457,6 @@ static void DictMergeWithRegionID( ttml_context_t *p_ctx, const char *psz_id,
DictionaryMerge( &p_node->attr_dict, p_dst );
}
}
-
- /* Merge region attributes */
- DictionaryMerge( &p_regionnode->attr_dict, p_dst );
}
}
--
2.13.0
More information about the vlc-devel
mailing list