[vlc-commits] codec/substtml: fix misleading diagnostic
    Filip Roséen 
    git at videolan.org
       
    Tue Sep 20 00:59:19 CEST 2016
    
    
  
vlc | branch: master | Filip Roséen <filip at atch.se> | Mon Sep 19 23:53:36 2016 +0200| [29b009ebe6fbbdfaf00499e6b3c262f2b0f96fc6] | committer: Hugo Beauzée-Luyssen
codec/substtml: fix misleading diagnostic
Given that the path handles both "region" and "style" attributes,
unconditionally having warnings that includes usage of "Style" is
rather misleading.
These changes fixes the issue by chaning the warning-diagnostic to
include more relevant information.
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=29b009ebe6fbbdfaf00499e6b3c262f2b0f96fc6
---
 modules/codec/substtml.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/codec/substtml.c b/modules/codec/substtml.c
index 05698d0..40d78cd 100644
--- a/modules/codec/substtml.c
+++ b/modules/codec/substtml.c
@@ -283,7 +283,7 @@ static ttml_style_t* ParseTTMLStyle( decoder_t *p_dec, xml_reader_t* p_reader, c
                 ttml_style_t* p_style = FindTextStyle( p_dec, token );
                 if( p_style == NULL )
                 {
-                    msg_Warn( p_dec, "Style \"%s\" not found", token );
+                    msg_Warn( p_dec, "IDREF '%s' in '%s' not found", token, attr );
                     free( value );
                     break;
                 }
@@ -293,7 +293,7 @@ static ttml_style_t* ParseTTMLStyle( decoder_t *p_dec, xml_reader_t* p_reader, c
                     ttml_style_t* p_next_style = FindTextStyle( p_dec, token );
                     if( p_next_style == NULL )
                     {
-                        msg_Warn( p_dec, "Style \"%s\" not found", token );
+                        msg_Warn( p_dec, "IDREF '%s' in '%s' not found", token, attr );
                         break;
                     }
                     MergeTTMLStyle( p_next_style, p_style );
@@ -310,7 +310,7 @@ static ttml_style_t* ParseTTMLStyle( decoder_t *p_dec, xml_reader_t* p_reader, c
                 ttml_style_t* p_style = FindTextStyle( p_dec, val );
                 if( p_style == NULL )
                 {
-                    msg_Warn( p_dec, "Style \"%s\" not found", val );
+                    msg_Warn( p_dec, "IDREF '%s' in '%s' not found", val, attr );
                     break;
                 }
                 MergeTTMLStyle( p_style , p_ttml_style );
    
    
More information about the vlc-commits
mailing list