mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-03 15:06:34 +00:00
omxvideodec: Implement dropping of too late frames via QoS
This commit is contained in:
parent
093a27fea3
commit
b10c2cfc72
1 changed files with 11 additions and 1 deletions
|
@ -699,7 +699,17 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self)
|
||||||
|
|
||||||
GST_BASE_VIDEO_CODEC_STREAM_LOCK (self);
|
GST_BASE_VIDEO_CODEC_STREAM_LOCK (self);
|
||||||
frame = _find_nearest_frame (self, buf);
|
frame = _find_nearest_frame (self, buf);
|
||||||
if (!frame && buf->omx_buf->nFilledLen > 0) {
|
|
||||||
|
if (frame
|
||||||
|
&&
|
||||||
|
gst_base_video_decoder_get_max_decode_time (GST_BASE_VIDEO_DECODER (self),
|
||||||
|
frame) < 0) {
|
||||||
|
GST_WARNING_OBJECT (self, "Frame is too late, dropping");
|
||||||
|
gst_omx_port_release_buffer (self->out_port, buf);
|
||||||
|
flow_ret =
|
||||||
|
gst_base_video_decoder_finish_frame (GST_BASE_VIDEO_DECODER (self),
|
||||||
|
frame);
|
||||||
|
} else if (!frame && buf->omx_buf->nFilledLen > 0) {
|
||||||
GstBuffer *outbuf;
|
GstBuffer *outbuf;
|
||||||
|
|
||||||
/* This sometimes happens at EOS or if the input is not properly framed,
|
/* This sometimes happens at EOS or if the input is not properly framed,
|
||||||
|
|
Loading…
Reference in a new issue