<p dir="ltr">Hello,</p>
<p dir="ltr">I have made the final changes.<br>
Please merge this patch if there are no more issues.</p>
<br><div class="gmail_quote"><div dir="ltr">On Thu 27 Apr, 2017, 10:22 PM Shaleen Jain, <<a href="mailto:shaleen.jain95@gmail.com">shaleen.jain95@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">fixes bug: <a href="https://trac.videolan.org/vlc/ticket/11813" rel="noreferrer" target="_blank">https://trac.videolan.org/vlc/ticket/11813</a><br>
mkv spec: <a href="https://www.matroska.org/technical/specs/index.html#languages" rel="noreferrer" target="_blank">https://www.matroska.org/technical/specs/index.html#languages</a><br>
---<br>
 modules/demux/mkv/matroska_segment_parse.cpp | 3 ++-<br>
 1 file changed, 2 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp<br>
index a4138d1d06..359e439d6d 100644<br>
--- a/modules/demux/mkv/matroska_segment_parse.cpp<br>
+++ b/modules/demux/mkv/matroska_segment_parse.cpp<br>
@@ -380,7 +380,8 @@ void matroska_segment_c::ParseTrackEntry( KaxTrackEntry *m )<br>
         E_CASE( KaxTrackLanguage, lang )<br>
         {<br>
             free( vars.tk->fmt.psz_language );<br>
-            vars.tk->fmt.psz_language = strdup( std::string( lang ).c_str() );<br>
+            const std::string slang ( lang );<br>
+            vars.tk->fmt.psz_language = strndup( slang.c_str (), slang.find_first_of( '-' ) );<br>
             debug( vars, "Track Language=`%s'", vars.tk->fmt.psz_language );<br>
         }<br>
         E_CASE( KaxCodecID, codecid )<br>
--<br>
2.12.2<br>
<br>
</blockquote></div>