mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 19:42:26 +00:00
validate: runner: prevent hash table modifications while iterating
A GHashTableIter is invalided if the hash table is modified while we are iterating. Prevent this by taking the runner lock. Fix assertion warnings with validate.file.transcode.to_vorbis_and_vp8_in_webm.Sintel_2010_720p_mkv_srt Reviewed-by: Thibault Saunier <tsaunier@gnome.org> Differential Revision: https://phabricator.freedesktop.org/D1026
This commit is contained in:
parent
5a745829dc
commit
b5e020daa2
1 changed files with 4 additions and 0 deletions
|
@ -621,6 +621,9 @@ _do_report_synthesis (GstValidateRunner * runner)
|
|||
gpointer key, value;
|
||||
GList *criticals = NULL;
|
||||
|
||||
/* Take the lock so the hash table won't be modified while we are iterating
|
||||
* over it */
|
||||
GST_VALIDATE_RUNNER_LOCK (runner);
|
||||
g_hash_table_iter_init (&iter, runner->priv->reports_by_type);
|
||||
while (g_hash_table_iter_next (&iter, &key, &value)) {
|
||||
GstValidateReport *report;
|
||||
|
@ -647,6 +650,7 @@ _do_report_synthesis (GstValidateRunner * runner)
|
|||
gst_validate_report_print_description (report);
|
||||
gst_validate_printf (NULL, "\n");
|
||||
}
|
||||
GST_VALIDATE_RUNNER_UNLOCK (runner);
|
||||
|
||||
return criticals;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue