[MPlayer-cvslog] r38364 - trunk/gui/dialog/menu.c
ib
subversion at mplayerhq.hu
Tue Apr 12 15:03:47 EEST 2022
Author: ib
Date: Tue Apr 12 15:03:46 2022
New Revision: 38364
Log:
Ensure that subtitle filenames are valid UTF-8 strings
Strings displayed in a GTK widget must be UTF-8 encoded.
Modified:
trunk/gui/dialog/menu.c
Modified: trunk/gui/dialog/menu.c
==============================================================================
--- trunk/gui/dialog/menu.c Tue Apr 5 21:35:45 2022 (r38363)
+++ trunk/gui/dialog/menu.c Tue Apr 12 15:03:46 2022 (r38364)
@@ -793,7 +793,7 @@ GtkWidget * CreatePopUpMenu( int wType )
for ( i=0;i < subs;i++ )
{
int ret = -1;
- char lng[60], tmp[80], *lang = NULL;
+ char lng[60], tmp[80], *lang = NULL, *basename;
/* file */
if ( i < subs0 )
{
@@ -803,7 +803,9 @@ GtkWidget * CreatePopUpMenu( int wType )
#endif
if ( lang )
{
- av_strlcpy( lng, mp_basename(lang), sizeof(lng) );
+ basename = g_filename_display_name(mp_basename(lang));
+ av_strlcpy( lng, basename, sizeof(lng) );
+ g_free(basename);
ret = 0;
}
}
More information about the MPlayer-cvslog
mailing list