mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
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>
This commit is contained in:
parent
d85368eada
commit
d7c716d562
1 changed files with 1 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue