summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2020-10-15 12:08:19 -0400
committerTim-Philipp Müller <tim@centricular.com>2020-10-16 10:52:23 +0100
commitf5589e00f826e05182aad43f00ea2091f2673463 (patch)
tree14de8e2d01ca80f8dc8e484bd4f81f7e193c6fbd
parenta082311bf598adccd297bc3ffa83a734c04f3d42 (diff)
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/1701>
-rw-r--r--sys/v4l2codecs/gstv4l2codecvp8dec.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/sys/v4l2codecs/gstv4l2codecvp8dec.c b/sys/v4l2codecs/gstv4l2codecvp8dec.c
index f142d56d6..0e5024c01 100644
--- a/sys/v4l2codecs/gstv4l2codecvp8dec.c
+++ b/sys/v4l2codecs/gstv4l2codecvp8dec.c
@@ -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);