Commit 61614b65 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

src/control/media_descriptor.c: Better libvlc_media_descriptor_duplicate.

parent a7ed4d1d
......@@ -139,14 +139,8 @@ void libvlc_media_descriptor_retain( libvlc_media_descriptor_t *p_md )
libvlc_media_descriptor_t *
libvlc_media_descriptor_duplicate( libvlc_media_descriptor_t *p_md_orig )
{
libvlc_media_descriptor_t * p_md;
p_md = malloc( sizeof(libvlc_media_descriptor_t) );
memcpy( p_md, p_md_orig, sizeof(libvlc_media_descriptor_t) );
vlc_gc_incref( p_md->p_input_item );
return p_md;
return libvlc_media_descriptor_new_from_input_item(
p_md->p_libvlc_instance, p_md_orig->p_input_item );
}
/**************************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment