av1decoder: Don't error out by dropped OBU
authorSeungha Yang <seungha@centricular.com>
Thu, 17 Nov 2022 16:59:55 +0000 (01:59 +0900)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Sat, 19 Nov 2022 11:58:01 +0000 (11:58 +0000)
OBU can be dropped if the current layer is not in selected operation
point

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3430>

subprojects/gst-plugins-bad/gst-libs/gst/codecs/gstav1decoder.c

index f537d39..a5a3013 100644 (file)
@@ -693,6 +693,11 @@ gst_av1_decoder_handle_frame (GstVideoDecoder * decoder,
   while (total_consumed < map.size) {
     res = gst_av1_parser_identify_one_obu (priv->parser,
         map.data + total_consumed, map.size, &obu, &consumed);
+    if (res == GST_AV1_PARSER_DROP) {
+      total_consumed += consumed;
+      continue;
+    }
+
     if (res != GST_AV1_PARSER_OK) {
       ret = GST_FLOW_ERROR;
       goto out;