From 21eb9b49be6bc026586730ce659f303119a1dbb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 10 Apr 2018 21:15:48 +0200 Subject: [PATCH] monoscope: Fixate pixel-aspect-ratio too and make sure the final caps are completely fixated Otherwise e.g. this fails with assertions: gst-launch-1.0 audiotestsrc ! audioconvert ! monoscope ! videoconvert ! \ videoscale ! video/x-raw,width=800,height=600 ! ximagesink --- gst/monoscope/gstmonoscope.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gst/monoscope/gstmonoscope.c b/gst/monoscope/gstmonoscope.c index e06196b1e7..fa0d541427 100644 --- a/gst/monoscope/gstmonoscope.c +++ b/gst/monoscope/gstmonoscope.c @@ -255,6 +255,9 @@ gst_monoscope_src_negotiate (GstMonoscope * monoscope) gst_structure_fixate_field_nearest_int (structure, "width", 320); gst_structure_fixate_field_nearest_int (structure, "height", 240); gst_structure_fixate_field_nearest_fraction (structure, "framerate", 25, 1); + gst_structure_fixate_field_nearest_fraction (structure, "pixel-aspect-ratio", + 1, 1); + target = gst_caps_fixate (target); gst_monoscope_src_setcaps (monoscope, target);