mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
omxvideoenc: Fix deadlock between srcpad stream lock and ::reset()
This commit is contained in:
parent
95b06504f9
commit
9a6cea5af3
1 changed files with 10 additions and 0 deletions
|
@ -758,6 +758,16 @@ gst_omx_video_enc_loop (GstOMXVideoEnc * self)
|
|||
GST_DEBUG_OBJECT (self, "Handling buffer: 0x%08x %lu", buf->omx_buf->nFlags,
|
||||
buf->omx_buf->nTimeStamp);
|
||||
|
||||
/* 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");
|
||||
gst_omx_port_release_buffer (self->out_port, buf);
|
||||
goto flushing;
|
||||
}
|
||||
|
||||
frame = _find_nearest_frame (self, buf);
|
||||
if ((buf->omx_buf->nFlags & OMX_BUFFERFLAG_CODECCONFIG)
|
||||
&& buf->omx_buf->nFilledLen > 0) {
|
||||
|
|
Loading…
Reference in a new issue