[MPlayer-dev-eng] last printf in libaf

Corey Hickey bugfood-ml at fatooh.org
Tue Mar 14 08:15:23 CET 2006


Reynaldo H. Verdejo Pinochet wrote:
> Hope is ok to commit, is the last one on libaf

[cut]

> +// af_format.c
> +
> +#define MSGTR_AF_FORMAT_UnknownSpecial "Unknown special\n"

My first thought was, "what does that mean?" I took a look at the code,
and thought saying "unknown format" or maybe "unknown special format"
would be better.

Then, I saw that it's in af_fmt2str(), which looks like it converts a
numeric format into a string for human consumption. Wouldn't it be
better to use snprintf() to put that message into the string so it gets
printed in the proper context?

I would prefer the attached patch.


Right now we would get something like:
...
Unknown special
alsa-init: format little-endian not supported by hardware, trying default
...

Using snprintf() would give us something like this:
...
alsa-init: format little-endian unknown-format not supported by
hardware, trying default
...


-Corey
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: format.c.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20060313/545894f8/attachment.asc>


More information about the MPlayer-dev-eng mailing list