[vlc-commits] [Git][videolan/vlc][master] 2 commits: input: don't signal EOF when input is stopped
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Wed Sep 27 20:01:39 UTC 2023
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
9e432fca by Alexandre Janniaux at 2023-09-27T19:44:54+00:00
input: don't signal EOF when input is stopped
When stopping an input, the player is signalled with vlc_player_Stop(),
which set the input for destruction in the player destructor thread.
When we called input_Stop(), the input thread will continue running, but
the demux will stop and notify the EOF state. This is reported by the
modified code to the es_out which considers it as a drain request, and
it's draining the decoders and the outputs despite the request to stop.
When calling input_Stop(), we are guaranteed that input_Stopped() will
be true afterwards, thus removing the signal removes this drain, and
removing the EOF signalling makes sense if the media was not finished
and was stopped.
- - - - -
96767510 by Alexandre Janniaux at 2023-09-27T19:44:54+00:00
input: remove trailing characters
- - - - -
1 changed file:
- src/input/input.c
Changes:
=====================================
src/input/input.c
=====================================
@@ -502,6 +502,12 @@ static void MainLoopDemux( input_thread_t *p_input, bool *pb_changed )
UpdateGenericFromDemux( p_input );
}
+ /* If the input is stopped, we don't signal anything to the es_out and
+ * ignore the previous results from the demux, and we need to stop
+ * demuxing to let the input close as fast as possible. */
+ if (input_Stopped(p_input))
+ return;
+
if( i_ret == VLC_DEMUXER_EOF )
{
msg_Dbg( p_input, "EOF reached" );
@@ -868,7 +874,7 @@ static void FillFileStatsIfAny( input_thread_t * p_input )
return;
uint64_t size;
-
+
if( vlc_stream_GetSize(stream_filters, &size) == VLC_SUCCESS )
input_item_AddStat( priv->p_item, "size", size );
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/95495e69b078381699f8eea6ba0c49bbd57c052a...96767510e0bcc3abd9e33d956fd02db6a7ec121d
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/95495e69b078381699f8eea6ba0c49bbd57c052a...96767510e0bcc3abd9e33d956fd02db6a7ec121d
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