mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:47:34 +00:00
LibVideo: Add a hook to notify clients upon reaching end of the stream
This commit is contained in:
parent
fe66490399
commit
33047b38ec
2 changed files with 5 additions and 0 deletions
|
@ -129,6 +129,10 @@ void PlaybackManager::dispatch_decoder_error(DecoderError error)
|
|||
case DecoderErrorCategory::EndOfStream:
|
||||
dbgln_if(PLAYBACK_MANAGER_DEBUG, "{}", error.string_literal());
|
||||
TRY_OR_FATAL_ERROR(m_playback_handler->stop());
|
||||
|
||||
if (on_end_of_stream)
|
||||
on_end_of_stream();
|
||||
|
||||
break;
|
||||
default:
|
||||
dbgln("Playback error encountered: {}", error.string_literal());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue