From c84f4e0491783a82d87a382adc1b2bbc63699b9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 11 Apr 2018 21:41:58 +0200 Subject: [PATCH] monoscope: Only fixate pixel-aspect-ratio if the field exists --- gst/monoscope/gstmonoscope.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gst/monoscope/gstmonoscope.c b/gst/monoscope/gstmonoscope.c index fa0d541427..26c4338868 100644 --- a/gst/monoscope/gstmonoscope.c +++ b/gst/monoscope/gstmonoscope.c @@ -255,8 +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); + if (gst_structure_has_field (structure, "pixel-aspect-ratio")) + gst_structure_fixate_field_nearest_fraction (structure, + "pixel-aspect-ratio", 1, 1); target = gst_caps_fixate (target); gst_monoscope_src_setcaps (monoscope, target);