On Sat, Jul 23, 2016, at 01:59 AM, [email protected] wrote:
> [...]
>
> /**
> + * Parse a comment tag.
> + */
> +static void read_comm(AVFormatContext *s, AVIOContext *pb, int taglen,
> + AVDictionary **metadata)
This should probably be `read_comment`, it's not too long of a
function name, and `read_comm` sounds a little ambiguous.
> +{
> + const char *key = "comment";
> + uint8_t *dst;
> + int encoding, dict_flags = AV_DICT_DONT_OVERWRITE |
> AV_DICT_DONT_STRDUP_VAL;
> + int language;
> +
> + if (taglen < 4)
> + return;
> +
> + encoding = avio_r8(pb);
> + taglen--;
> +
> + language = avio_rl24(pb);
> + taglen -= 3;
Unless you intend to do checking of `encoding`/`language`, and
proceed conditionally, this should probably combine both `taglen`
statements. E.g.
encoding = avio_r8(pb);
language = avio_rl24(pb);
tagline -= 4;
> [...]
As far I can tell, that's it for this patch (someone else might
have some more comments).
--
Josh
_______________________________________________
ffmpeg-devel mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel