mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-04 06:29:31 +00:00
omxaudioenc: Signal the drain GCond even if downstream returned an error
This commit is contained in:
parent
1ba8ec3d37
commit
8a5fbb876c
1 changed files with 4 additions and 2 deletions
|
@ -416,6 +416,7 @@ gst_omx_audio_enc_loop (GstOMXAudioEnc * self)
|
||||||
GstOMXBuffer *buf = NULL;
|
GstOMXBuffer *buf = NULL;
|
||||||
GstFlowReturn flow_ret = GST_FLOW_OK;
|
GstFlowReturn flow_ret = GST_FLOW_OK;
|
||||||
GstOMXAcquireBufferReturn acq_return;
|
GstOMXAcquireBufferReturn acq_return;
|
||||||
|
gboolean is_eos;
|
||||||
|
|
||||||
klass = GST_OMX_AUDIO_ENC_GET_CLASS (self);
|
klass = GST_OMX_AUDIO_ENC_GET_CLASS (self);
|
||||||
|
|
||||||
|
@ -468,6 +469,8 @@ gst_omx_audio_enc_loop (GstOMXAudioEnc * self)
|
||||||
buf->omx_buf->nTimeStamp);
|
buf->omx_buf->nTimeStamp);
|
||||||
|
|
||||||
GST_BASE_AUDIO_ENCODER_STREAM_LOCK (self);
|
GST_BASE_AUDIO_ENCODER_STREAM_LOCK (self);
|
||||||
|
is_eos = ! !(buf->omx_buf->nFlags & OMX_BUFFERFLAG_EOS);
|
||||||
|
|
||||||
if ((buf->omx_buf->nFlags & OMX_BUFFERFLAG_CODECCONFIG)
|
if ((buf->omx_buf->nFlags & OMX_BUFFERFLAG_CODECCONFIG)
|
||||||
&& buf->omx_buf->nFilledLen > 0) {
|
&& buf->omx_buf->nFilledLen > 0) {
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
|
@ -523,8 +526,7 @@ gst_omx_audio_enc_loop (GstOMXAudioEnc * self)
|
||||||
outbuf, n_samples);
|
outbuf, n_samples);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((flow_ret == GST_FLOW_OK && (buf->omx_buf->nFlags & OMX_BUFFERFLAG_EOS))
|
if (is_eos || flow_ret == GST_FLOW_UNEXPECTED) {
|
||||||
|| flow_ret == GST_FLOW_UNEXPECTED) {
|
|
||||||
g_mutex_lock (self->drain_lock);
|
g_mutex_lock (self->drain_lock);
|
||||||
if (self->draining) {
|
if (self->draining) {
|
||||||
GST_DEBUG_OBJECT (self, "Drained");
|
GST_DEBUG_OBJECT (self, "Drained");
|
||||||
|
|
Loading…
Reference in a new issue