av1parse: Save the default alignment
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Wed, 2 Mar 2022 21:22:25 +0000 (16:22 -0500)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 4 Mar 2022 21:58:15 +0000 (21:58 +0000)
Otherwise the transformation is not applied and decoders may not
get the appropriate format despite the caps being negotiated
correctly.

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

subprojects/gst-plugins-bad/gst/videoparsers/gstav1parse.c

index 2674692..cf75013 100644 (file)
@@ -862,9 +862,11 @@ gst_av1_parse_set_sink_caps (GstBaseParse * parse, GstCaps * caps)
 
   in_caps = gst_caps_copy (caps);
   /* default */
-  if (align == GST_AV1_PARSE_ALIGN_NONE)
+  if (align == GST_AV1_PARSE_ALIGN_NONE) {
+    align = GST_AV1_PARSE_ALIGN_BYTE;
     gst_caps_set_simple (in_caps, "alignment", G_TYPE_STRING,
-        gst_av1_parse_alignment_to_string (GST_AV1_PARSE_ALIGN_BYTE), NULL);
+        gst_av1_parse_alignment_to_string (align), NULL);
+  }
 
   /* negotiate with downstream, set output align */
   gst_av1_parse_negotiate (self, in_caps);