[FFmpeg-devel] [PATCH 1/3] lavf/subtitles: add some SMIL helpers.

Nicolas George nicolas.george at normalesup.org
Wed Jun 20 21:47:29 CEST 2012


Le decadi 30 prairial, an CCXX, Clément Bœsch a écrit :
> +const char *ff_smil_get_attr_ptr(const char *s, const char *attr)
> +{
> +    const int len = strlen(attr);
> +
> +    while (*s) {
> +        while (*s && !isspace(*s))
> +            s++;
> +        while (isspace(*s))
> +            s++;
> +        if (!av_strncasecmp(s, attr, len) && s[len] == '=')
> +            return s + len + 1 + (s[len + 1] == '"');
> +    }
> +    return NULL;
> +}

If it is anything like HTML, it could still be fooled by something like
<node args="video=42; audio=1729">
I think.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120620/df82489b/attachment.asc>


More information about the ffmpeg-devel mailing list