omxvideodec: Implement dropping of too late frames via QoS

This commit is contained in:
Sebastian Dröge 2011-11-08 09:09:28 +01:00
parent 093a27fea3
commit b10c2cfc72

View file

@ -699,7 +699,17 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self)
GST_BASE_VIDEO_CODEC_STREAM_LOCK (self);
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;
/* This sometimes happens at EOS or if the input is not properly framed,