[vlc-devel] [PATCH] demux: mkv: parse language codes with embedded country codes
Shaleen
shaleen.jain95 at gmail.com
Mon May 1 09:39:24 CEST 2017
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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170501/f2efd1d4/attachment.html>
More information about the vlc-devel
mailing list