[vlc-devel] [PATCH] live555: retrieve RTSP track languages from SDP

Jean-Baptiste Kempf jb at videolan.org
Tue Dec 17 01:23:39 CET 2013


On 17 Dec, Gilles Chanteperdrix wrote :
> +	    /* Try and parse a=lang: attribute */
> +	    lang = strstr(sub->savedSDPLines(), "a=lang:");
> +	    if (lang) {
> +		    tk->fmt.psz_language = (char *)malloc(strlen(lang) + 1);
> +		    sscanf(lang, "a=lang:%s", tk->fmt.psz_language);
> +	    }

Please, no tabs in source code.

And you should check malloc return.

And can't you do it without the sscanf?

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device



More information about the vlc-devel mailing list