Wait at most 0.5 seconds for getting an input buffer for EOS
This commit is contained in:
parent
3be4965d00
commit
d2aff4ecd3
@ -1257,8 +1257,9 @@ gst_amc_video_dec_finish (GstVideoDecoder * decoder)
|
|||||||
GST_VIDEO_DECODER_STREAM_UNLOCK (self);
|
GST_VIDEO_DECODER_STREAM_UNLOCK (self);
|
||||||
/* Send an EOS buffer to the component and let the base
|
/* Send an EOS buffer to the component and let the base
|
||||||
* class drop the EOS event. We will send it later when
|
* class drop the EOS event. We will send it later when
|
||||||
* the EOS buffer arrives on the output port. */
|
* the EOS buffer arrives on the output port.
|
||||||
idx = gst_amc_codec_dequeue_input_buffer (self->codec, -1);
|
* Wait at most 0.5s here. */
|
||||||
|
idx = gst_amc_codec_dequeue_input_buffer (self->codec, 500000);
|
||||||
GST_VIDEO_DECODER_STREAM_LOCK (self);
|
GST_VIDEO_DECODER_STREAM_LOCK (self);
|
||||||
|
|
||||||
if (idx >= 0 && idx < self->n_input_buffers) {
|
if (idx >= 0 && idx < self->n_input_buffers) {
|
||||||
@ -1308,8 +1309,9 @@ gst_amc_video_dec_drain (GstAmcVideoDec * self)
|
|||||||
GST_VIDEO_DECODER_STREAM_UNLOCK (self);
|
GST_VIDEO_DECODER_STREAM_UNLOCK (self);
|
||||||
/* Send an EOS buffer to the component and let the base
|
/* Send an EOS buffer to the component and let the base
|
||||||
* class drop the EOS event. We will send it later when
|
* class drop the EOS event. We will send it later when
|
||||||
* the EOS buffer arrives on the output port. */
|
* the EOS buffer arrives on the output port.
|
||||||
idx = gst_amc_codec_dequeue_input_buffer (self->codec, -1);
|
* Wait at most 0.5s here. */
|
||||||
|
idx = gst_amc_codec_dequeue_input_buffer (self->codec, 500000);
|
||||||
GST_VIDEO_DECODER_STREAM_LOCK (self);
|
GST_VIDEO_DECODER_STREAM_LOCK (self);
|
||||||
|
|
||||||
if (idx >= 0 && idx < self->n_input_buffers) {
|
if (idx >= 0 && idx < self->n_input_buffers) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user