mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-02 21:48:55 +00:00
omxvideodec: Fix deadlock if ::reset is called before finding the corresponding frame of a decoded buffer
This commit is contained in:
parent
f93a45fb66
commit
2f2c17a1b5
1 changed files with 9 additions and 0 deletions
|
@ -390,6 +390,15 @@ _find_nearest_frame (GstOMXVideoDec * self, GstOMXBuffer * buf)
|
|||
guint64 best_diff = G_MAXUINT64;
|
||||
BufferIdentification *best_id = NULL;
|
||||
|
||||
/* This prevents a deadlock between the srcpad stream
|
||||
* lock and the videocodec stream lock, if ::reset()
|
||||
* is called at the wrong time
|
||||
*/
|
||||
if (gst_omx_port_is_flushing (self->out_port)) {
|
||||
GST_DEBUG_OBJECT (self, "Flushing -- returning NULL");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GST_BASE_VIDEO_CODEC_STREAM_LOCK (self);
|
||||
for (l = GST_BASE_VIDEO_CODEC (self)->frames; l; l = l->next) {
|
||||
GstVideoFrame *tmp = l->data;
|
||||
|
|
Loading…
Reference in a new issue