diff options
author | Ruben Gonzalez <rgonzalez@fluendo.com> | 2023-01-22 00:52:56 +0100 |
---|---|---|
committer | Ruben Gonzalez <rgonzalez@fluendo.com> | 2023-01-22 00:52:56 +0100 |
commit | 2cdfccc3b5032b3450ed8cb251c3da6835f48a8a (patch) | |
tree | 021f1a46636c3c7125b09aecbeb2106f22f1f7d8 | |
parent | 4c1d01ff57f488d8a068923757aa6016ed6087ba (diff) | |
download | gstreamer-2cdfccc3b5032b3450ed8cb251c3da6835f48a8a.tar.gz |
glvideomixer: Fixing error with mouse navigation events when no pixel-aspect-ratio
Handling mouse navigation events in glvideomixer element, if no
pixel-aspect-ratio info in the caps, an assertion error is produced
inside gst_util_fraction_multiply because default denominator is zero.
Error fixed:
```
(gst-launch-1.0:102654): GStreamer-CRITICAL **: 00:47:51.598: gst_util_fraction_multiply: assertion 'b_d != 0' failed
```
Simple pipeline to reproduce the issue:
```
gst-launch-1.0 -v glvideomixer name=mix ! glimagesinkelement gltestsrc ! mix.sink_0
```
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3766>
-rw-r--r-- | subprojects/gst-plugins-base/ext/gl/gstglvideomixer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/subprojects/gst-plugins-base/ext/gl/gstglvideomixer.c b/subprojects/gst-plugins-base/ext/gl/gstglvideomixer.c index 3926c9b87f..c08e7a0763 100644 --- a/subprojects/gst-plugins-base/ext/gl/gstglvideomixer.c +++ b/subprojects/gst-plugins-base/ext/gl/gstglvideomixer.c @@ -1393,7 +1393,7 @@ src_pad_mouse_event (GstElement * element, GstPad * pad, gpointer user_data) GstGLVideoMixerPad *mix_pad = GST_GL_VIDEO_MIXER_PAD (pad); GstCaps *caps = gst_pad_get_current_caps (pad); GstStructure *event_st, *caps_st; - gint par_n, par_d; + gint par_n = 1, par_d = 1; gdouble event_x, event_y; GstVideoRectangle rect; |