Commit 7766f8aa authored by François Cartegnie's avatar François Cartegnie 🤞
Browse files

demux: mkv: have mouse events registration non fatal

parent 1ec80b9e
......@@ -48,6 +48,9 @@ void event_thread_t::SetPci(const pci_t *data)
{
vlc_mutex_locker l(&lock);
if(es_list.empty())
return;
memcpy(&pci_packet, data, sizeof(pci_packet));
#ifndef WORDS_BIGENDIAN
......@@ -356,7 +359,9 @@ bool event_thread_t::AddES( es_out_id_t* es, int category )
void event_thread_t::DelES( es_out_id_t* es )
{
vlc_mutex_locker lock_guard( &lock );
es_list.erase( std::find( es_list.begin(), es_list.end(), es ) );
es_list_t::iterator info = std::find( es_list.begin(), es_list.end(), es );
if( info != es_list.end() )
es_list.erase( info );
}
} // namespace
......
......@@ -1123,13 +1123,10 @@ bool matroska_segment_c::ESCreate()
{
track.p_es = es_out_Add( sys.demuxer.out, &track.fmt );
if( track.p_es )
if( track.p_es &&
!sys.ev.AddES( track.p_es, track.fmt.i_cat ) )
{
if (!sys.ev.AddES( track.p_es, track.fmt.i_cat ))
{
es_out_Del( sys.demuxer.out, track.p_es );
track.p_es = NULL;
}
msg_Warn( &sys.demuxer, "Could not register events, interactive menus will not work");
}
}
......
Supports Markdown
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