[vlc-commits] [Git][videolan/vlc][master] lib/media: pass explicit instance to save meta
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Sat Jun 18 17:52:19 UTC 2022
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
1e13c0c7 by RĂ©mi Denis-Courmont at 2022-06-18T17:34:41+00:00
lib/media: pass explicit instance to save meta
The caller may want to use a different instance than that which the
media was created from.
- - - - -
2 changed files:
- include/vlc/libvlc_media.h
- lib/media.c
Changes:
=====================================
include/vlc/libvlc_media.h
=====================================
@@ -487,10 +487,12 @@ LIBVLC_API void libvlc_media_set_meta( libvlc_media_t *p_md,
/**
* Save the meta previously set
*
+ * \param inst LibVLC instance
* \param p_md the media descriptor
* \return true if the write operation was successful
*/
-LIBVLC_API int libvlc_media_save_meta( libvlc_media_t *p_md );
+LIBVLC_API int libvlc_media_save_meta( libvlc_instance_t *inst,
+ libvlc_media_t *p_md );
/**
* Get the current statistics about the media
=====================================
lib/media.c
=====================================
@@ -706,10 +706,10 @@ void libvlc_media_set_meta( libvlc_media_t *p_md, libvlc_meta_t e_meta, const ch
}
// Save the meta previously set
-int libvlc_media_save_meta( libvlc_media_t *p_md )
+int libvlc_media_save_meta( libvlc_instance_t *inst, libvlc_media_t *p_md )
{
assert( p_md );
- vlc_object_t *p_obj = VLC_OBJECT(p_md->p_libvlc_instance->p_libvlc_int);
+ vlc_object_t *p_obj = VLC_OBJECT(inst->p_libvlc_int);
return input_item_WriteMeta( p_obj, p_md->p_input_item ) == VLC_SUCCESS;
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/1e13c0c7b06ed4d572278f6bb379073e142d7b42
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/1e13c0c7b06ed4d572278f6bb379073e142d7b42
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list