diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c index b91a32e79f..f748587693 100644 --- a/gst-libs/gst/video/gstvideodecoder.c +++ b/gst-libs/gst/video/gstvideodecoder.c @@ -657,6 +657,10 @@ _new_output_state (GstVideoFormat fmt, guint width, guint height, GST_VIDEO_INFO_MULTIVIEW_MODE (tgt) = GST_VIDEO_INFO_MULTIVIEW_MODE (ref); GST_VIDEO_INFO_MULTIVIEW_FLAGS (tgt) = GST_VIDEO_INFO_MULTIVIEW_FLAGS (ref); + } else { + /* Default to MONO, overridden as needed by sub-classes */ + GST_VIDEO_INFO_MULTIVIEW_MODE (tgt) = GST_VIDEO_MULTIVIEW_MODE_MONO; + GST_VIDEO_INFO_MULTIVIEW_FLAGS (tgt) = GST_VIDEO_MULTIVIEW_FLAGS_NONE; } } @@ -3786,6 +3790,16 @@ gst_video_decoder_negotiate_default (GstVideoDecoder * decoder) g_return_val_if_fail (GST_VIDEO_INFO_WIDTH (&state->info) != 0, FALSE); g_return_val_if_fail (GST_VIDEO_INFO_HEIGHT (&state->info) != 0, FALSE); + /* If the base class didn't set any multiview params, assume mono + * now */ + if (GST_VIDEO_INFO_MULTIVIEW_MODE (&state->info) == + GST_VIDEO_MULTIVIEW_MODE_NONE) { + GST_VIDEO_INFO_MULTIVIEW_MODE (&state->info) = + GST_VIDEO_MULTIVIEW_MODE_MONO; + GST_VIDEO_INFO_MULTIVIEW_FLAGS (&state->info) = + GST_VIDEO_MULTIVIEW_FLAGS_NONE; + } + GST_DEBUG_OBJECT (decoder, "output_state par %d/%d fps %d/%d", state->info.par_n, state->info.par_d, state->info.fps_n, state->info.fps_d);