# HG changeset patch # User yaz # Date 1172808588 28800 # Node ID 96b884703411db986aec4574a4a355354cf94826 # Parent 53f63f43663f20e3dd73f255a75d0a60ecbe482c [svn] - try to use str_to_utf8() to fill up tuple. we discovered that indecent ogg stream sends non-utf8 metadata. diff -r 53f63f43663f -r 96b884703411 ChangeLog --- a/ChangeLog Thu Mar 01 18:22:51 2007 -0800 +++ b/ChangeLog Thu Mar 01 20:09:48 2007 -0800 @@ -1,3 +1,10 @@ +2007-03-02 02:22:51 +0000 Giacomo Lozito + revision [1630] + - extra check with g_utf8_validate to avoid the osd crash when a non-utf8 string survives the str_to_utf8 conversion + trunk/src/aosd/aosd_trigger.c | 22 ++++++++++++++-------- + 1 file changed, 14 insertions(+), 8 deletions(-) + + 2007-03-01 14:31:20 +0000 Yoshiki Yazawa revision [1628] - determine whether stream is seekable or not by checking duration. it is safe to use with proxy. diff -r 53f63f43663f -r 96b884703411 src/vorbis/vorbis.c --- a/src/vorbis/vorbis.c Thu Mar 01 18:22:51 2007 -0800 +++ b/src/vorbis/vorbis.c Thu Mar 01 20:09:48 2007 -0800 @@ -770,20 +770,20 @@ if ((comment = ov_comment(vorbisfile, -1))) { tuple->track_name = - g_strdup(vorbis_comment_query(comment, "title", 0)); + str_to_utf8(vorbis_comment_query(comment, "title", 0)); tuple->performer = - g_strdup(vorbis_comment_query(comment, "artist", 0)); + str_to_utf8(vorbis_comment_query(comment, "artist", 0)); tuple->album_name = - g_strdup(vorbis_comment_query(comment, "album", 0)); + str_to_utf8(vorbis_comment_query(comment, "album", 0)); if (vorbis_comment_query(comment, "tracknumber", 0) != NULL) tuple->track_number = atoi(vorbis_comment_query(comment, "tracknumber", 0)); - tuple->date = g_strdup(vorbis_comment_query(comment, "date", 0)); - tuple->genre = g_strdup(vorbis_comment_query(comment, "genre", 0)); + tuple->date = str_to_utf8(vorbis_comment_query(comment, "date", 0)); + tuple->genre = str_to_utf8(vorbis_comment_query(comment, "genre", 0)); tuple->comment = - g_strdup(vorbis_comment_query(comment, "comment", 0)); + str_to_utf8(vorbis_comment_query(comment, "comment", 0)); /* remove any blank tags */ REMOVE_NONEXISTANT_TAG(tuple->performer);