[mythtv] [PATH] mythmusic bug fix

MaxPower maxpower44 at tiscali.fr
Mon Dec 8 05:39:31 EST 2003


The same bugfix for flacdecoder and vorbisdecoder

Anyone would apply this patch ?

Xavier

MaxPower wrote:

> This patch fix the bug when mp3 file contain special caractère like 
> accent.
> please apply this patch
> xavier
>
>------------------------------------------------------------------------
>
>--- mythmusic/mythmusic/maddecoder.cpp	2003-09-10 02:21:45.000000000 +0200
>+++ /usr/local/src/maddecoder.cpp	2003-12-07 22:06:36.000000000 +0100
>@@ -553,7 +553,7 @@
>     if (!ignore_id3)
>     {
>         // use ID3 header
>-        id3_file *id3file = id3_file_open(filename.ascii(), 
>+        id3_file *id3file = id3_file_open(filename.utf8(), 
>                                           ID3_FILE_MODE_READONLY);
>         if (!id3file)
>         {
>@@ -644,7 +644,7 @@
>     timer = mad_timer_zero;
> 
> 
>-    FILE *input = fopen(filename.ascii(), "r");
>+    FILE *input = fopen(filename.utf8(), "r");
>     struct stat s;
>     fstat(fileno(input), &s);
>     unsigned long old_bitrate = 0;
>  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>mythtv-dev mailing list
>mythtv-dev at mythtv.org
>http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>  
>

-------------- next part --------------
--- flacdecoder.cpp	2003-10-04 02:27:37.000000000 +0200
+++ /usr/local/src/flacdecoder.cpp	2003-12-08 11:33:31.000000000 +0100
@@ -424,13 +424,13 @@
     QString artist = "", album = "", title = "", genre = "";
     int year = 0, tracknum = 0, length = 0;
 
-    FILE *input = fopen(filename.ascii(), "r");
+    FILE *input = fopen(filename.utf8(), "r");
 
     if (!input)
         return NULL;
 
     FLAC__Metadata_Chain *chain = FLAC__metadata_chain_new();
-    if (!FLAC__metadata_chain_read(chain, filename.ascii()))
+    if (!FLAC__metadata_chain_read(chain, filename.utf8()))
     {
         FLAC__metadata_chain_delete(chain); 
         return NULL;
@@ -499,13 +499,13 @@
 
 void FlacDecoder::commitMetadata(Metadata *mdata)
 {
-    FILE *input = fopen(filename.ascii(), "r");
+    FILE *input = fopen(filename.utf8(), "r");
 
     if (!input)
         return;
 
     FLAC__Metadata_Chain *chain = FLAC__metadata_chain_new();
-    if (!FLAC__metadata_chain_read(chain, filename.ascii()))
+    if (!FLAC__metadata_chain_read(chain, filename.utf8()))
     {
         FLAC__metadata_chain_delete(chain);
         return;
-------------- next part --------------
--- /usr/local/src/cvs/myth/mythmusic/mythmusic/vorbisdecoder.cpp	2003-09-10 02:21:45.000000000 +0200
+++ /usr/local/src/vorbisdecoder.cpp	2003-12-08 11:29:20.000000000 +0100
@@ -332,7 +332,7 @@
     QString artist = "", album = "", title = "", genre = "";
     int year = 0, tracknum = 0, length = 0;
 
-    FILE *input = fopen(filename.ascii(), "r");
+    FILE *input = fopen(filename.utf8(), "r");
 
     if (!input)
         return NULL;


More information about the mythtv-dev mailing list