mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-29 15:22:11 +02:00
plugin: Set initial display resolution to 1x1
We do not support zero width/height (described in our caps). Set initial video dimensions to 1x1. They are going to be updated on first buffer after video info is set. This avoids running into https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1139 and makes sure we do not do any divisions by zero here either.
This commit is contained in:
4
lib/gst/plugin/gstclapperpaintable.c
vendored
4
lib/gst/plugin/gstclapperpaintable.c
vendored
@@ -53,6 +53,10 @@ gst_clapper_paintable_class_init (GstClapperPaintableClass *klass)
|
||||
static void
|
||||
gst_clapper_paintable_init (GstClapperPaintable *self)
|
||||
{
|
||||
self->display_width = 1;
|
||||
self->display_height = 1;
|
||||
self->display_aspect_ratio = 1.0;
|
||||
|
||||
self->par_n = DEFAULT_PAR_N;
|
||||
self->par_d = DEFAULT_PAR_D;
|
||||
self->pixel_aspect = ((gdouble) self->par_d / self->par_n);
|
||||
|
Reference in New Issue
Block a user