# HG changeset patch # User giacomo # Date 1172802171 28800 # Node ID 53f63f43663f20e3dd73f255a75d0a60ecbe482c # Parent 2430c9773fa7815131981c72015e7a6aa80156cf [svn] - extra check with g_utf8_validate to avoid the osd crash when a non-utf8 string survives the str_to_utf8 conversion diff -r 2430c9773fa7 -r 53f63f43663f ChangeLog --- a/ChangeLog Thu Mar 01 06:31:20 2007 -0800 +++ b/ChangeLog Thu Mar 01 18:22:51 2007 -0800 @@ -1,3 +1,12 @@ +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. + + trunk/src/madplug/input.c | 14 +++++++++++--- + trunk/src/madplug/plugin.c | 2 +- + 2 files changed, 12 insertions(+), 4 deletions(-) + + 2007-03-01 12:33:43 +0000 William Pitcock revision [1626] - revert r1624 due to the fact that it breaks diff -r 2430c9773fa7 -r 53f63f43663f src/aosd/aosd_trigger.c --- a/src/aosd/aosd_trigger.c Thu Mar 01 06:31:20 2007 -0800 +++ b/src/aosd/aosd_trigger.c Thu Mar 01 18:22:51 2007 -0800 @@ -164,10 +164,13 @@ title = playlist_get_songtitle(active, pos); } gchar *utf8_title = str_to_utf8( title ); - gchar *utf8_title_markup = g_markup_printf_escaped( - "%s" , global_config->osd->text.fonts_name[0] , utf8_title ); - aosd_display( utf8_title_markup , global_config->osd , FALSE ); - g_free( utf8_title_markup ); + if ( g_utf8_validate( utf8_title , -1 , NULL ) == TRUE ) + { + gchar *utf8_title_markup = g_markup_printf_escaped( + "%s" , global_config->osd->text.fonts_name[0] , utf8_title ); + aosd_display( utf8_title_markup , global_config->osd , FALSE ); + g_free( utf8_title_markup ); + } g_free( utf8_title ); g_free( title ); } @@ -228,10 +231,13 @@ { /* string formatting is done here a.t.m. - TODO - improve this area */ gchar *utf8_title = str_to_utf8( pl_entry->title ); - gchar *utf8_title_markup = g_markup_printf_escaped( - "%s" , global_config->osd->text.fonts_name[0] , utf8_title ); - aosd_display( utf8_title_markup , global_config->osd , FALSE ); - g_free( utf8_title_markup ); + if ( g_utf8_validate( utf8_title , -1 , NULL ) == TRUE ) + { + gchar *utf8_title_markup = g_markup_printf_escaped( + "%s" , global_config->osd->text.fonts_name[0] , utf8_title ); + aosd_display( utf8_title_markup , global_config->osd , FALSE ); + g_free( utf8_title_markup ); + } g_free( utf8_title ); g_free( prevs->title ); prevs->title = g_strdup(pl_entry->title);