rtmp2sink: Correctly return GST_FLOW_ERROR on error
authorArun Raghavan <arun@asymptotic.io>
Fri, 14 Oct 2022 20:21:07 +0000 (16:21 -0400)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Sat, 15 Oct 2022 08:21:40 +0000 (08:21 +0000)
commit34ca46c786efffd9ba72a5ffa08b26fc04dde943
tree6437900f1fa1b3c0214abc98763e81ec36ce45f5
parentece84d69a29ccd09485ce11f0285a3ebe39e4b74
rtmp2sink: Correctly return GST_FLOW_ERROR on error

If there is an error while connecting, the streaming task will be stopped, and
is_running() will be false, causing a GST_FLOW_FLUSHING to be returned. Instead,
we perform the error check (!self->connection) first, to return an error if
that's what occured.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3189>
subprojects/gst-plugins-bad/gst/rtmp2/gstrtmp2sink.c