mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
transcoder: Handle the case where several errors are posted
There were cases where the loop was already destroyed when we were receiving the following message.
This commit is contained in:
parent
9d890c152e
commit
b3544e24ba
1 changed files with 12 additions and 2 deletions
|
@ -1079,13 +1079,20 @@ _error_cb (GstTranscoder * self, GError * error, GstStructure * details,
|
|||
{
|
||||
if (data->error == NULL)
|
||||
g_propagate_error (&data->error, error);
|
||||
g_main_loop_quit (data->loop);
|
||||
|
||||
if (data->loop) {
|
||||
g_main_loop_quit (data->loop);
|
||||
data->loop = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_done_cb (GstTranscoder * self, RunSyncData * data)
|
||||
{
|
||||
g_main_loop_quit (data->loop);
|
||||
if (data->loop) {
|
||||
g_main_loop_quit (data->loop);
|
||||
data->loop = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1110,6 +1117,9 @@ gst_transcoder_run (GstTranscoder * self, GError ** error)
|
|||
if (!data.error)
|
||||
g_main_loop_run (data.loop);
|
||||
|
||||
g_signal_handlers_disconnect_by_func (self, _error_cb, &data);
|
||||
g_signal_handlers_disconnect_by_func (self, _done_cb, &data);
|
||||
|
||||
if (data.error) {
|
||||
if (error)
|
||||
g_propagate_error (error, data.error);
|
||||
|
|
Loading…
Reference in a new issue