[MPlayer-dev-eng] Equals in Ogg comments

Nicolas George nicolas.george at ens.fr
Sat Feb 24 13:36:38 CET 2007


Hi.

The parsing of Ogg comments in demux_ogg.c has a small bug. I have some Ogg
files with tags such as:

	title=Ashitaka Sekki
	album=Mononoke Hime
	album_ja=もののけ 姫
	artist=Joe Hisaishi
	artist_ja=久石 譲
	title_en=The Tale of Ashitaka
	title_ja=アシタカせっき
	tracknumber=1

When I play them with mplayer, I got:

Clip info:
 Name: ja=アシタカせっき
 Album: ja=もののけ 姫
 Artist: ja=久石 譲
 Track: 1

Here is a trivial patch that checks for the '=' sign. It may be cleaner to
store the result of strlen in a local variable, but since it will be
computed at compile time, it does not matter much.

Regards,

-- 
  Nicolas George
-------------- next part --------------
Index: libmpdemux/demux_ogg.c
===================================================================
--- libmpdemux/demux_ogg.c	(revision 22335)
+++ libmpdemux/demux_ogg.c	(working copy)
@@ -455,7 +455,8 @@
     else {
 	for (i = 0; table[i].ogg; i++)
 	{
-	    if (!strncasecmp(*cmt, table[i].ogg, strlen(table[i].ogg)))
+	    if (!strncasecmp(*cmt, table[i].ogg, strlen(table[i].ogg)) &&
+		(*cmt)[strlen(table[i].ogg)] == '=')
 	    {
 		hdr = table[i].mp;
 		val = *cmt + strlen(table[i].ogg) + 1;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 185 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070224/20469a8a/attachment.pgp>


More information about the MPlayer-dev-eng mailing list