[FFmpeg-devel] [PATCH] AVFormat: LRC demuxer and muxer

Carl Eugen Hoyos cehoyos at ag.or.at
Wed Jul 9 15:42:17 CEST 2014


Star Brilliant <m13253 <at> hotmail.com> writes:

> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 
> 02110-1301 USA

It looks as if your mailer broke the patch, consider 
to attach the patch.
(Sorry if I am wrong on this.)

> +static const AVMetadataConv ffpriv_lrc_metadata_conv[] = {

This should not be part of a header (it gets duplicated).
Please use a C file lrc.c that only contains this 
symbol and define it in the header.

> +    if(p[offset] && p[offset] == '[' &&
> +       p[offset + 1] >= 'a' && p[offset + 1] <= 'z')
> +        return offset;
> +    else
> +        return -1;

You may ignore this:
Since it makes future patches smaller, some developers 
prefer:
if(p[offset]...) {
    return offset;
} else {
    return -1;
}

> +    if(!memcmp(p->buf + offset, "[ti:", 4) ||
> +       !memcmp(p->buf + offset, "[al:", 4) ||
> +       !memcmp(p->buf + offset, "[ar:", 4))
> +        return AVPROBE_SCORE_MAX;

MAX score is not ok for 32bit, use MAX/2 (or less).

Carl Eugen



More information about the ffmpeg-devel mailing list