[MPlayer-dev-eng] [PATCH] Use avformat name matching rules

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Jul 16 23:23:22 CEST 2010


On Fri, Jul 16, 2010 at 01:30:39PM -0400, Alex Converse wrote:
> I copy-pasted match_format() because I didn't want to open the can of
> worms that is making it public API.

I'm not the maintainer so consider it a bystanders comment....
but I consider that kind of "solution" sweeping as sweeping lav* issues
"under the rug" and just updating the strings as necessary would at
least mean less code.
I expect distro packagers may have different opinions though.

> -            if (strcmp(*p, priv->avif->name) == 0)
> +            if (match_format(*p, priv->avif->name))

Depending on what name is supposed to be and what we are allowed to
assume what must stay the same without changing API,
just
len = strlen(*p);
strncmp(*p, priv->avif->name, len) == 0 &&
(priv->avif->name[len] == 0 || riv->avif->name[len] == ',')
might be possible as well.


More information about the MPlayer-dev-eng mailing list