Commit 03ce67df75 for ffmpeg
commit 03ce67df753cbadd17f0f972cdb464e770027c5d
Author: Michael Niedermayer <michael@niedermayer.cc>
Date: Wed Oct 14 01:10:34 2026 +0200
ffplay: factor clearing the list search out of unpinning the list
Assisted-by: Claude
diff --git a/fftools/ffplay_list.c b/fftools/ffplay_list.c
index 4869cf3d49..a6c67fb0a0 100644
--- a/fftools/ffplay_list.c
+++ b/fftools/ffplay_list.c
@@ -819,8 +819,7 @@ void list_view_pin(ListView *lv, int pinned)
} else {
SDL_StopTextInput();
lv->last_input = av_gettime_relative() - LIST_HOLD_TIME;
- lv->search[0] = 0;
- list_update_rows(lv);
+ list_view_clear_search(lv);
}
lv->render_pending = 1;
}
@@ -864,6 +863,13 @@ void list_view_text(ListView *lv, const char *text)
list_search(lv, text);
}
+void list_view_clear_search(ListView *lv)
+{
+ lv->search[0] = 0;
+ list_update_rows(lv);
+ lv->render_pending = 1;
+}
+
/* asks for a render when what a visible list points at changed; the render waits until the pending events are handled,
* so a sweep across the list renders once */
void list_view_hover(ListView *lv, int x, int y)
diff --git a/fftools/ffplay_list.h b/fftools/ffplay_list.h
index 7814a88b5f..688c7da815 100644
--- a/fftools/ffplay_list.h
+++ b/fftools/ffplay_list.h
@@ -93,6 +93,11 @@ int list_view_key(ListView *lv, SDL_Keycode key);
*/
void list_view_text(ListView *lv, const char *text);
+/**
+ * Clears the search, listing all entries.
+ */
+void list_view_clear_search(ListView *lv);
+
/**
* Keeps the mouse position, in window coordinates, -1 when the mouse left the window.
*/