From eceaa54a3880dad139edb4e3bfe9c548246558cb Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 15 Oct 2026 18:22:08 +0200 Subject: [PATCH] ffplay: report an event that could not be pushed A stream whose event the event loop never hears of stays pending, so say when that happens. Assisted-by: Claude --- fftools/ffplay.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fftools/ffplay.c b/fftools/ffplay.c index 9fe202f7e3..d17aa1c422 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -2377,7 +2377,8 @@ static void push_stream_event(VideoState *is, Uint32 type) { SDL_Event event = { .user = { .type = type, .code = is->id } }; - SDL_PushEvent(&event); + if (SDL_PushEvent(&event) < 0) + av_log(NULL, AV_LOG_ERROR, "Could not push the event of '%s': %s\n", is->filename, SDL_GetError()); } static int video_thread(void *arg) @@ -3914,8 +3915,10 @@ static void file_list_read(const char *path, int play_if_no_dir) { int ret = 0; - if (dir_thread) + if (dir_thread) { + av_log(NULL, AV_LOG_VERBOSE, "Not listing '%s' while '%s' is being read\n", path, dir_request.path); return; + } dir_request.play_if_no_dir = play_if_no_dir; dir_request.cancelled = 0; SDL_AtomicSet(&dir_request.abort, 0);