v4l2codecs: vp8: Allow baseclass from skipping frames

In preparation for !1670, this will allow the base class from skipping frames
that should not be displayed. Previously it would complain about unordered
decoding taking place in the driver.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1696>
This commit is contained in:
Nicolas Dufresne 2020-10-15 12:08:19 -04:00
parent a3e6d9fc24
commit 0f5fc9646e

View file

@ -682,17 +682,13 @@ gst_v4l2_codec_vp8_dec_output_picture (GstVp8Decoder * decoder,
goto error;
}
if (!gst_v4l2_decoder_dequeue_src (self->decoder, &frame_num)) {
GST_ELEMENT_ERROR (self, STREAM, DECODE,
("Decoder did not produce a frame"), (NULL));
goto error;
}
if (frame_num != picture->system_frame_number) {
GST_ELEMENT_ERROR (self, STREAM, DECODE,
("Decoder produced out of order frame"), (NULL));
goto error;
}
do {
if (!gst_v4l2_decoder_dequeue_src (self->decoder, &frame_num)) {
GST_ELEMENT_ERROR (self, STREAM, DECODE,
("Decoder did not produce a frame"), (NULL));
goto error;
}
} while (frame_num != picture->system_frame_number);
finish_frame:
gst_v4l2_request_set_done (request);