[vlc-commits] playlist/m3u: fix item creation not checked

Thomas Guillem git at videolan.org
Sun Apr 17 07:30:06 CEST 2016


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sun Apr 17 08:28:31 2016 +0300| [091d2018cd754acea2a99ef2e2b10b54f5caea0c] | committer: Thomas Guillem

playlist/m3u: fix item creation not checked

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

 modules/demux/playlist/m3u.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/demux/playlist/m3u.c b/modules/demux/playlist/m3u.c
index 323bc0e..e6b2a58 100644
--- a/modules/demux/playlist/m3u.c
+++ b/modules/demux/playlist/m3u.c
@@ -257,11 +257,13 @@ static int Demux( demux_t *p_demux )
 
             p_input = input_item_NewExt( psz_mrl, psz_name, i_duration,
                                          ITEM_TYPE_UNKNOWN, ITEM_NET_UNKNOWN );
-            input_item_AddOptions( p_input, i_options, ppsz_options, 0 );
-
             free( psz_parse );
             free( psz_mrl );
 
+            if( !p_input )
+                goto error;
+            input_item_AddOptions( p_input, i_options, ppsz_options, 0 );
+
             if( !EMPTY_STR(psz_artist) )
                 input_item_SetArtist( p_input, psz_artist );
             if( psz_name ) input_item_SetTitle( p_input, psz_name );



More information about the vlc-commits mailing list