diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2015-05-21 16:24:48 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-05-21 16:24:48 +0300 |
commit | 3230e51993c7c4ef2db09b071577b69cb2ba26f2 (patch) | |
tree | 442e7f4c6afc99369367c9e2562c58778392159a /ext/gl/gstglvideomixer.c | |
parent | 41c11e3979ffbf83a7e039909fc98ebd0040ef57 (diff) | |
download | gstreamer-plugins-bad-3230e51993c7c4ef2db09b071577b69cb2ba26f2.tar.gz |
compositor/glvideomixer: Don't calculate PAR/DAR with unset GstVideoInfos
Otherwise we divide by zero.
Diffstat (limited to 'ext/gl/gstglvideomixer.c')
-rw-r--r-- | ext/gl/gstglvideomixer.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/gl/gstglvideomixer.c b/ext/gl/gstglvideomixer.c index 148c70261..6ae693df1 100644 --- a/ext/gl/gstglvideomixer.c +++ b/ext/gl/gstglvideomixer.c @@ -630,6 +630,15 @@ _mixer_pad_get_output_size (GstGLVideoMixer * mix, gint pad_width, pad_height; guint dar_n, dar_d; + /* FIXME: Anything better we can do here? */ + if (!vagg_pad->info.finfo + || vagg_pad->info.finfo->format == GST_VIDEO_FORMAT_UNKNOWN) { + GST_DEBUG_OBJECT (mix_pad, "Have no caps yet"); + *width = 0; + *height = 0; + return; + } + pad_width = mix_pad->width <= 0 ? GST_VIDEO_INFO_WIDTH (&vagg_pad->info) : mix_pad->width; |