summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@igalia.com>2021-06-14 13:16:30 -0400
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-06-21 09:18:32 +0000
commitd7c716d56289bb74dc95cea25eb8601475e57911 (patch)
treedc92ff002fe199651fd3bb07023fd00d77565fa5 /gst-libs
parentd85368eadab3f9085296e2042415274794b660e2 (diff)
downloadgstreamer-plugins-bad-d7c716d56289bb74dc95cea25eb8601475e57911.tar.gz
transcoder: Fix usage of g_error_propagate
In the error callback we were propagating an error we were not owning which is incorrect use of the API. Also we were clearing a GError we already propagated which is wrong as propagating gives ownership away. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2325>
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/transcoder/gsttranscoder.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gst-libs/gst/transcoder/gsttranscoder.c b/gst-libs/gst/transcoder/gsttranscoder.c
index 72a7d38a7..48c5c708e 100644
--- a/gst-libs/gst/transcoder/gsttranscoder.c
+++ b/gst-libs/gst/transcoder/gsttranscoder.c
@@ -938,7 +938,7 @@ static void
_error_cb (RunSyncData * data, GError * error, GstStructure * details)
{
if (data->error == NULL)
- g_propagate_error (&data->error, error);
+ data->error = g_error_copy (error);
if (data->loop) {
g_main_loop_quit (data->loop);
@@ -990,7 +990,6 @@ gst_transcoder_run (GstTranscoder * self, GError ** error)
if (error)
g_propagate_error (error, data.error);
- g_clear_error (&data.error);
return FALSE;
}