[vlc-devel] [PATCH] demux: mkv: parse language codes with embedded country codes

Steve Lhomme robux4 at gmail.com
Tue May 2 08:34:25 CEST 2017


LGTM.

On Mon, May 1, 2017 at 9:39 AM, Shaleen <shaleen.jain95 at gmail.com> wrote:
> Hello,
>
> I have made the final changes.
> Please merge this patch if there are no more issues.
>
>
> On Thu 27 Apr, 2017, 10:22 PM Shaleen Jain, <shaleen.jain95 at gmail.com>
> wrote:
>>
>> fixes bug: https://trac.videolan.org/vlc/ticket/11813
>> mkv spec: https://www.matroska.org/technical/specs/index.html#languages
>> ---
>>  modules/demux/mkv/matroska_segment_parse.cpp | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/modules/demux/mkv/matroska_segment_parse.cpp
>> b/modules/demux/mkv/matroska_segment_parse.cpp
>> index a4138d1d06..359e439d6d 100644
>> --- a/modules/demux/mkv/matroska_segment_parse.cpp
>> +++ b/modules/demux/mkv/matroska_segment_parse.cpp
>> @@ -380,7 +380,8 @@ void matroska_segment_c::ParseTrackEntry(
>> KaxTrackEntry *m )
>>          E_CASE( KaxTrackLanguage, lang )
>>          {
>>              free( vars.tk->fmt.psz_language );
>> -            vars.tk->fmt.psz_language = strdup( std::string( lang
>> ).c_str() );
>> +            const std::string slang ( lang );
>> +            vars.tk->fmt.psz_language = strndup( slang.c_str (),
>> slang.find_first_of( '-' ) );
>>              debug( vars, "Track Language=`%s'", vars.tk->fmt.psz_language
>> );
>>          }
>>          E_CASE( KaxCodecID, codecid )
>> --
>> 2.12.2
>>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list