[vlc-commits] Create and copy the meta array only if the copied item does have one.

Rémi Duraffort git at videolan.org
Sun Jun 19 11:42:50 CEST 2011


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sun Jun 19 11:41:56 2011 +0200| [a54c800de5c6f83125fc95d04b4fe40880afbe93] | committer: Rémi Duraffort

Create and copy the meta array only if the copied item does have one.

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

 src/input/item.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/input/item.c b/src/input/item.c
index de510bc..ccd7013 100644
--- a/src/input/item.c
+++ b/src/input/item.c
@@ -896,8 +896,12 @@ input_item_t *input_item_Copy( vlc_object_t *p_obj, input_item_t *p_input )
                                   p_input->ppsz_options[i],
                                   p_input->optflagv[i] );
         }
-        p_new_input->p_meta = vlc_meta_New();
-        vlc_meta_Merge( p_new_input->p_meta, p_input->p_meta );
+
+        if( p_input->p_meta )
+        {
+            p_new_input->p_meta = vlc_meta_New();
+            vlc_meta_Merge( p_new_input->p_meta, p_input->p_meta );
+        }
     }
 
     vlc_mutex_unlock( &p_input->lock );



More information about the vlc-commits mailing list