Skip to content

Commit 0b1baa3

Browse files
committed
runloop: dispatch movie_stop on MOVIE_END instead of movie_stop_playback
When BSV_FLAG_MOVIE_END is set, runloop_check_state unconditionally calls movie_stop_playback. That function early-returns at the BSV_FLAG_MOVIE_PLAYBACK check (task_movie.c:377) when the active session is a recording, leaving bsv_movie_state_handle alive with its file still open. The MOVIE_END flag is set from both playback and recording paths. bsv_movie_read_next_events (the source of most MOVIE_END sets) is called during recording when seeking, per the comment at input/bsv/bsvmovie.c:1092, and its truncation/I/O-error paths set MOVIE_END unconditionally. The "Didn't really stop movie!" log at task_movie.c:438 fires whenever this happens. Use movie_stop, which dispatches to movie_stop_playback or movie_stop_record based on the flags, so recording sessions are torn down correctly.
1 parent a646194 commit 0b1baa3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

runloop.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7486,7 +7486,7 @@ int runloop_iterate(void)
74867486
bsv_movie_next_frame(input_st);
74877487
if (input_st->bsv_movie_state.flags & BSV_FLAG_MOVIE_END)
74887488
{
7489-
movie_stop_playback(input_st);
7489+
movie_stop(input_st);
74907490
command_event(CMD_EVENT_PAUSE, NULL);
74917491
}
74927492
#endif

0 commit comments

Comments
 (0)