[vlc-commits] codec: ttml: fix empty dict check (fix #18260)

Francois Cartegnie git at videolan.org
Tue May 23 12:06:07 CEST 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue May 23 12:04:33 2017 +0200| [c12fa124d6a85b85d9bb3cf41bb9976128137e08] | committer: Francois Cartegnie

codec: ttml: fix empty dict check (fix #18260)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c12fa124d6a85b85d9bb3cf41bb9976128137e08
---

 modules/codec/ttml/substtml.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/ttml/substtml.c b/modules/codec/ttml/substtml.c
index ec9bd327d2..e7be874639 100644
--- a/modules/codec/ttml/substtml.c
+++ b/modules/codec/ttml/substtml.c
@@ -492,7 +492,7 @@ static ttml_style_t * InheritTTMLStyles( ttml_context_t *p_ctx, tt_node_t *p_nod
             DictMergeWithRegionID( p_ctx, psz_regionid, &merged );
     }
 
-    if( merged.i_size && merged.p_entries[0] && (p_ttml_style = ttml_style_New()) )
+    if( vlc_dictionary_keys_count( &merged ) && (p_ttml_style = ttml_style_New()) )
     {
         DictToTTMLStyle( &merged, p_ttml_style );
     }



More information about the vlc-commits mailing list