From 5e441e2197fcf5df39244fa98ed62af30e657f3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 11 Apr 2018 21:40:23 +0200 Subject: [PATCH] audiovisualizer: Only fixate pixel-aspect-ratio if the field exists It's optional. --- gst-libs/gst/pbutils/gstaudiovisualizer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/pbutils/gstaudiovisualizer.c b/gst-libs/gst/pbutils/gstaudiovisualizer.c index eb889742ff..a185f25d2b 100644 --- a/gst-libs/gst/pbutils/gstaudiovisualizer.c +++ b/gst-libs/gst/pbutils/gstaudiovisualizer.c @@ -812,8 +812,9 @@ gst_audio_visualizer_src_negotiate (GstAudioVisualizer * scope) gst_structure_fixate_field_nearest_int (structure, "width", 320); gst_structure_fixate_field_nearest_int (structure, "height", 200); 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);