[vlc-devel] commit: RAM: we need to allocate the decoded string ( Rémi Denis-Courmont )

git version control git at videolan.org
Tue Jan 5 17:19:28 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Jan  5 18:18:32 2010 +0200| [5cf2bcd602bdae96ec59c47773fb8332d3a23bff] | committer: Rémi Denis-Courmont 

RAM: we need to allocate the decoded string

This fixes facce14d97f2d65e890ddac7ba0b4313dde817bf.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5cf2bcd602bdae96ec59c47773fb8332d3a23bff
---

 modules/demux/playlist/ram.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/modules/demux/playlist/ram.c b/modules/demux/playlist/ram.c
index 9736b14..f3efef7 100644
--- a/modules/demux/playlist/ram.c
+++ b/modules/demux/playlist/ram.c
@@ -282,7 +282,7 @@ static int Demux( demux_t *p_demux )
                            &psz_cdnum, &psz_comments ); /* clipinfo has various sub parameters, which is parsed by this function */
                     }
                     else if( !strcmp( psz_param, "author" ) )
-                        psz_author = decode_URI(psz_value);
+                        psz_author = decode_URI_duplicate(psz_value);
                     else if( !strcmp( psz_param, "start" ) )
                     {
                         i_start = ParseTime( psz_value, strlen( psz_value ) );
@@ -304,9 +304,9 @@ static int Demux( demux_t *p_demux )
                         }
                     }
                     else if( !strcmp( psz_param, "title" ) )
-                        psz_title = decode_URI(psz_value);
+                        psz_title = decode_URI_duplicate(psz_value);
                     else if( !strcmp( psz_param, "copyright" ) )
-                        psz_copyright = decode_URI(psz_value);
+                        psz_copyright = decode_URI_duplicate(psz_value);
                     else
                     {   /* TODO: insert option anyway? Currently ignores*/
                         /* INSERT_ELEM( ppsz_options, i_options, i_options, psz_option ); */
@@ -433,19 +433,19 @@ static void ParseClipInfo( const char *psz_clipinfo, char **ppsz_artist, char **
             break;
         /* Put into args */
         if( !strcmp( psz_param, "artist name" ) )
-            *ppsz_artist = decode_URI( psz_value );
+            *ppsz_artist = decode_URI_duplicate( psz_value );
         else if( !strcmp( psz_param, "title" ) )
-            *ppsz_title = decode_URI( psz_value );
+            *ppsz_title = decode_URI_duplicate( psz_value );
         else if( !strcmp( psz_param, "album name" ) )
-            *ppsz_album = decode_URI( psz_value );
+            *ppsz_album = decode_URI_duplicate( psz_value );
         else if( !strcmp( psz_param, "genre" ) )
-            *ppsz_genre = decode_URI( psz_value );
+            *ppsz_genre = decode_URI_duplicate( psz_value );
         else if( !strcmp( psz_param, "year" ) )
-            *ppsz_year = decode_URI( psz_value );
+            *ppsz_year = decode_URI_duplicate( psz_value );
         else if( !strcmp( psz_param, "cdnum" ) )
-            *ppsz_cdnum = decode_URI( psz_value );
+            *ppsz_cdnum = decode_URI_duplicate( psz_value );
         else if( !strcmp( psz_param, "comments" ) )
-            *ppsz_comments = decode_URI( psz_value );
+            *ppsz_comments = decode_URI_duplicate( psz_value );
 
         free( psz_suboption );
         psz_option_next++;




More information about the vlc-devel mailing list