mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-19 13:55:41 +00:00
Wait at most 0.5 seconds for getting an input buffer for EOS
This commit is contained in:
parent
3be4965d00
commit
d2aff4ecd3
1 changed files with 6 additions and 4 deletions
|
@ -1257,8 +1257,9 @@ gst_amc_video_dec_finish (GstVideoDecoder * decoder)
|
|||
GST_VIDEO_DECODER_STREAM_UNLOCK (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. */
|
||||
idx = gst_amc_codec_dequeue_input_buffer (self->codec, -1);
|
||||
* the EOS buffer arrives on the output port.
|
||||
* Wait at most 0.5s here. */
|
||||
idx = gst_amc_codec_dequeue_input_buffer (self->codec, 500000);
|
||||
GST_VIDEO_DECODER_STREAM_LOCK (self);
|
||||
|
||||
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);
|
||||
/* 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. */
|
||||
idx = gst_amc_codec_dequeue_input_buffer (self->codec, -1);
|
||||
* the EOS buffer arrives on the output port.
|
||||
* Wait at most 0.5s here. */
|
||||
idx = gst_amc_codec_dequeue_input_buffer (self->codec, 500000);
|
||||
GST_VIDEO_DECODER_STREAM_LOCK (self);
|
||||
|
||||
if (idx >= 0 && idx < self->n_input_buffers) {
|
||||
|
|
Loading…
Reference in a new issue