mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-17 22:06:41 +00:00
mp3parse: fix deadlock with accurate seeks.
Release pending_accurate_seeks_lock before forwarding the seek event upstream. Fixes #575068.
This commit is contained in:
parent
b313e3809b
commit
abf7f47769
1 changed files with 10 additions and 7 deletions
|
@ -1781,20 +1781,23 @@ mp3parse_handle_seek (GstMPEGAudioParse * mp3parse, GstEvent * event)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
g_mutex_lock (mp3parse->pending_accurate_seeks_lock);
|
|
||||||
event = gst_event_new_seek (rate, GST_FORMAT_BYTES, flags, cur_type,
|
event = gst_event_new_seek (rate, GST_FORMAT_BYTES, flags, cur_type,
|
||||||
byte_cur, stop_type, byte_stop);
|
byte_cur, stop_type, byte_stop);
|
||||||
|
g_mutex_lock (mp3parse->pending_accurate_seeks_lock);
|
||||||
|
seek->upstream_start = byte_cur;
|
||||||
|
seek->timestamp_start = start;
|
||||||
|
mp3parse->pending_accurate_seeks =
|
||||||
|
g_slist_prepend (mp3parse->pending_accurate_seeks, seek);
|
||||||
|
g_mutex_unlock (mp3parse->pending_accurate_seeks_lock);
|
||||||
if (gst_pad_push_event (mp3parse->sinkpad, event)) {
|
if (gst_pad_push_event (mp3parse->sinkpad, event)) {
|
||||||
mp3parse->exact_position = TRUE;
|
mp3parse->exact_position = TRUE;
|
||||||
seek->upstream_start = byte_cur;
|
|
||||||
seek->timestamp_start = start;
|
|
||||||
mp3parse->pending_accurate_seeks =
|
|
||||||
g_slist_prepend (mp3parse->pending_accurate_seeks, seek);
|
|
||||||
g_mutex_unlock (mp3parse->pending_accurate_seeks_lock);
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
} else {
|
} else {
|
||||||
g_mutex_unlock (mp3parse->pending_accurate_seeks_lock);
|
|
||||||
mp3parse->exact_position = TRUE;
|
mp3parse->exact_position = TRUE;
|
||||||
|
g_mutex_lock (mp3parse->pending_accurate_seeks_lock);
|
||||||
|
mp3parse->pending_accurate_seeks =
|
||||||
|
g_slist_remove (mp3parse->pending_accurate_seeks, seek);
|
||||||
|
g_mutex_unlock (mp3parse->pending_accurate_seeks_lock);
|
||||||
g_free (seek);
|
g_free (seek);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue