[vlc-commits] ttml: correct region style resolution order and process region referential styling
Remita Amine
git at videolan.org
Tue May 30 12:06:59 CEST 2017
vlc | branch: master | Remita Amine <remitamine at gmail.com> | Sat May 20 19:51:55 2017 +0100| [98c92965626942fbbbdc6b57d77420a46a6ac7fa] | committer: Francois Cartegnie
ttml: correct region style resolution order and process region referential styling
Signed-off-by: Francois Cartegnie <fcvlcdev at free.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=98c92965626942fbbbdc6b57d77420a46a6ac7fa
---
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 0f9fbf8248..373dc24d62 100644
--- a/modules/codec/ttml/substtml.c
+++ b/modules/codec/ttml/substtml.c
@@ -460,7 +460,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 )
{
@@ -473,9 +479,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 );
}
}
More information about the vlc-commits
mailing list