From d21c1f13d1bdbf83359a3a787b5a3cf9be616e81 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Wed, 21 Aug 2024 14:38:14 -0400 Subject: [PATCH] videorate: Do not fail setting caps on flushing pad Avoiding to error out when flushing "at the wrong time" for example. Part-of: --- subprojects/gst-plugins-base/gst/videorate/gstvideorate.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/subprojects/gst-plugins-base/gst/videorate/gstvideorate.c b/subprojects/gst-plugins-base/gst/videorate/gstvideorate.c index ae9ba13790..5ec8c0eb02 100644 --- a/subprojects/gst-plugins-base/gst/videorate/gstvideorate.c +++ b/subprojects/gst-plugins-base/gst/videorate/gstvideorate.c @@ -1101,6 +1101,11 @@ gst_video_rate_sink_event (GstBaseTransform * trans, GstEvent * event) GST_WARNING_OBJECT (videorate, "Could not resend caps after closing " " segment"); + if (GST_PAD_IS_FLUSHING (trans->srcpad)) { + gst_caps_unref (rolled_back_caps); + return TRUE; + } + GST_ELEMENT_ERROR (videorate, CORE, NEGOTIATION, ("Could not resend caps after closing segment"), (NULL)); gst_caps_unref (rolled_back_caps);