mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
videoencoder: Release STREAM_LOCK during gst_pad_push()
Release STREAM_LOCK before calling gst_pad_push() and take it back afterward so that upstream isn't blocked while output buffer is being pushed downstream. https://bugzilla.gnome.org/show_bug.cgi?id=715192
This commit is contained in:
parent
fb49674a39
commit
595dd27ede
1 changed files with 6 additions and 1 deletions
|
@ -2297,7 +2297,9 @@ gst_video_encoder_finish_frame (GstVideoEncoder * encoder,
|
|||
discont = FALSE;
|
||||
}
|
||||
|
||||
GST_VIDEO_ENCODER_STREAM_UNLOCK (encoder);
|
||||
gst_pad_push (encoder->srcpad, gst_buffer_ref (tmpbuf));
|
||||
GST_VIDEO_ENCODER_STREAM_LOCK (encoder);
|
||||
}
|
||||
priv->new_headers = FALSE;
|
||||
}
|
||||
|
@ -2335,8 +2337,11 @@ gst_video_encoder_finish_frame (GstVideoEncoder * encoder,
|
|||
gst_video_encoder_release_frame (encoder, frame);
|
||||
frame = NULL;
|
||||
|
||||
if (ret == GST_FLOW_OK)
|
||||
if (ret == GST_FLOW_OK) {
|
||||
GST_VIDEO_ENCODER_STREAM_UNLOCK (encoder);
|
||||
ret = gst_pad_push (encoder->srcpad, buffer);
|
||||
GST_VIDEO_ENCODER_STREAM_LOCK (encoder);
|
||||
}
|
||||
|
||||
done:
|
||||
/* handed out */
|
||||
|
|
Loading…
Reference in a new issue