proxysink: event_function needs to handle the event when it is disconnecetd from...
authorJose Quaresma <quaresma.jose@gmail.com>
Wed, 12 Aug 2020 10:57:10 +0000 (11:57 +0100)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 13 Aug 2020 14:21:05 +0000 (14:21 +0000)
without this a disconneted proxysink fail when goes to play with error:

 Internal data stream error.
 streaming stopped, reason error (-5)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1508>

gst/proxy/gstproxysink.c

index c53e652..f44f8ec 100644 (file)
@@ -226,8 +226,10 @@ gst_proxy_sink_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
       self->pending_sticky_events = TRUE;
       ret = TRUE;
     }
-  } else
+  } else {
     gst_event_unref (event);
+    ret = TRUE;
+  }
 
   return ret;
 }