diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2018-08-13 15:10:37 +0200 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2018-08-30 10:59:30 +0200 |
commit | 34bc02e397d8db72c06d86f7a8734c0d34d78276 (patch) | |
tree | 99e0ff396abf4cfc81b57ef6ac4f199e713942d9 /omx/gstomxaudioenc.c | |
parent | c89b54fe7867568f85ccc3b8660bbbd839659fcd (diff) | |
download | gst-omx-34bc02e397d8db72c06d86f7a8734c0d34d78276.tar.gz |
omx: allow gst_omx_port_acquire_buffer() to not wait for buffers
Will be needed to implement GST_BUFFER_POOL_ACQUIRE_FLAG_DONTWAIT.
https://bugzilla.gnome.org/show_bug.cgi?id=796918
Diffstat (limited to 'omx/gstomxaudioenc.c')
-rw-r--r-- | omx/gstomxaudioenc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/omx/gstomxaudioenc.c b/omx/gstomxaudioenc.c index 036b911..c5c1d6f 100644 --- a/omx/gstomxaudioenc.c +++ b/omx/gstomxaudioenc.c @@ -285,7 +285,7 @@ gst_omx_audio_enc_loop (GstOMXAudioEnc * self) klass = GST_OMX_AUDIO_ENC_GET_CLASS (self); - acq_return = gst_omx_port_acquire_buffer (port, &buf); + acq_return = gst_omx_port_acquire_buffer (port, &buf, GST_OMX_WAIT); if (acq_return == GST_OMX_ACQUIRE_BUFFER_ERROR) { goto component_error; } else if (acq_return == GST_OMX_ACQUIRE_BUFFER_FLUSHING) { @@ -960,7 +960,7 @@ gst_omx_audio_enc_handle_frame (GstAudioEncoder * encoder, GstBuffer * inbuf) * _loop() can't call _finish_frame() and we might block forever * because no input buffers are released */ GST_AUDIO_ENCODER_STREAM_UNLOCK (self); - acq_ret = gst_omx_port_acquire_buffer (port, &buf); + acq_ret = gst_omx_port_acquire_buffer (port, &buf, GST_OMX_WAIT); if (acq_ret == GST_OMX_ACQUIRE_BUFFER_ERROR) { GST_AUDIO_ENCODER_STREAM_LOCK (self); @@ -1145,7 +1145,7 @@ gst_omx_audio_enc_drain (GstOMXAudioEnc * self) /* Send an EOS buffer to the component and let the base * class drop the EOS event. We will send it later when * the EOS buffer arrives on the output port. */ - acq_ret = gst_omx_port_acquire_buffer (self->enc_in_port, &buf); + acq_ret = gst_omx_port_acquire_buffer (self->enc_in_port, &buf, GST_OMX_WAIT); if (acq_ret != GST_OMX_ACQUIRE_BUFFER_OK) { GST_AUDIO_ENCODER_STREAM_LOCK (self); GST_ERROR_OBJECT (self, "Failed to acquire buffer for draining: %d", |