[MPlayer-dev-eng] [PATCH] demuxer-independent sub and audio track selection

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Feb 24 16:31:29 CET 2008


On Sun, Feb 24, 2008 at 06:12:39PM +0300, Evgeniy Stepanov wrote:
> -	    if (mpctx->demuxer->type == DEMUXER_TYPE_MATROSKA)
> -		demux_mkv_get_audio_lang(mpctx->demuxer, audio_id, lang, 9);
> +            sh_audio_t* sh = mpctx->sh_audio;
> +            if (sh && sh->lang) {
> +                strncpy(lang, sh->lang, 39);
> +                lang[39] = 0;
> +            }

strncpy should be considered forbidden for new code, use av_strlcpy.
Otherwise: very nice (though I did not check the implementation
details).



More information about the MPlayer-dev-eng mailing list