srt: fix segfault if send_headers() failed

The error handling code was assuming that 'internal_error' was set,
while we were passing the caller GError.
The internal error is already propagated to the caller later on.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4524>
This commit is contained in:
Guillaume Desmottes 2023-05-02 11:41:41 +02:00 committed by GStreamer Marge Bot
parent f64acbf9e5
commit 3a5510f61c

View file

@ -1846,7 +1846,7 @@ gst_srt_object_write_one (GstSRTObject * srtobject, GstBufferList * headers,
retry:
if (!srtobject->sent_headers) {
if (!gst_srt_object_send_headers (srtobject, srtobject->sock,
srtobject->poll_id, poll_timeout, headers, error)) {
srtobject->poll_id, poll_timeout, headers, &internal_error)) {
goto err;
}