[vlc-commits] [Git][videolan/vlc][master] qt: fix input_item_parser_id leak in dialogs_provider
Steve Lhomme (@robUx4)
gitlab at videolan.org
Wed Mar 13 07:12:49 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
45573a4d by Fatih Uzunoglu at 2024-03-13T06:45:03+00:00
qt: fix input_item_parser_id leak in dialogs_provider
- - - - -
1 changed file:
- modules/gui/qt/dialogs/dialogs_provider.cpp
Changes:
=====================================
modules/gui/qt/dialogs/dialogs_provider.cpp
=====================================
@@ -388,9 +388,9 @@ void DialogsProvider::mediaInfoDialog( const MLItemId& itemId )
}
else
{
- static const struct input_item_parser_cbs_t cbs = {
- // on_ended
- []( input_item_t * const item, const int status, void * const userData ) {
+ static const struct vlc_metadata_cbs cbs = {
+ // on_preparse_ended
+ []( input_item_t * const item, enum input_item_preparse_status status, void * const userData ) {
const auto dp = static_cast<DialogsProvider *>( userData );
if ( status == ITEM_PREPARSE_TIMEOUT || status == ITEM_PREPARSE_FAILED )
@@ -402,14 +402,24 @@ void DialogsProvider::mediaInfoDialog( const MLItemId& itemId )
dp->mediaInfoDialog( sharedInputItem );
}, Qt::QueuedConnection );
},
+ // on_art_fetch_ended
+ NULL,
// on_subtree_added
NULL,
// on_attachments_added
- NULL,
+ NULL
};
- input_item_parser_id_t * const parser = input_item_Parse( inputItem, VLC_OBJECT( p_intf ), &cbs, this );
- assert( parser );
+ const int result = libvlc_MetadataRequest( vlc_object_instance( p_intf ),
+ inputItem,
+ static_cast<input_item_meta_request_option_t>(META_REQUEST_OPTION_SCOPE_ANY | META_REQUEST_OPTION_SCOPE_FORCED),
+ &cbs,
+ this,
+ 0,
+ NULL );
+ if( Q_UNLIKELY( result != VLC_SUCCESS ) )
+ msg_Warn( p_intf, "libvlc_MetadataRequest() failed for input item %p (%s, %s)",
+ inputItem, inputItem->psz_name, inputItem->psz_uri );
}
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/45573a4d34e744d110e32b4bc64e4954d2b5182c
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/45573a4d34e744d110e32b4bc64e4954d2b5182c
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