videodecoder: Copy multiview-mode, flags and view count from ref info
authorJan Schmidt <jan@centricular.com>
Fri, 12 Jun 2015 15:35:52 +0000 (01:35 +1000)
committerJan Schmidt <jan@centricular.com>
Fri, 12 Jun 2015 15:36:45 +0000 (01:36 +1000)
When copying info from the reference input state, duplicate
all the fields of the video info. The sub-class will have the
chance to override them later.

gst-libs/gst/video/gstvideodecoder.c

index 3420b1c7d0555a01cf6d016673939e285e634057..fc7b8b7aa5aca07b873a56c12e39eea942426f90 100644 (file)
@@ -754,6 +754,12 @@ _new_output_state (GstVideoFormat fmt, guint width, guint height,
     tgt->par_d = ref->par_d;
     tgt->fps_n = ref->fps_n;
     tgt->fps_d = ref->fps_d;
+    tgt->views = ref->views;
+    if (GST_VIDEO_INFO_MULTIVIEW_MODE (ref) != GST_VIDEO_MULTIVIEW_MODE_NONE) {
+      GST_VIDEO_INFO_MULTIVIEW_MODE (tgt) = GST_VIDEO_INFO_MULTIVIEW_MODE (ref);
+      GST_VIDEO_INFO_MULTIVIEW_FLAGS (tgt) =
+          GST_VIDEO_INFO_MULTIVIEW_FLAGS (ref);
+    }
   }
 
   GST_DEBUG ("reference par %d/%d fps %d/%d",