mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
compositor/glvideomixer: Don't calculate PAR/DAR with unset GstVideoInfos
Otherwise we divide by zero.
This commit is contained in:
parent
b27379051a
commit
a3b806de4e
2 changed files with 18 additions and 0 deletions
|
@ -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;
|
||||
|
|
|
@ -223,6 +223,15 @@ _mixer_pad_get_output_size (GstCompositor * comp,
|
|||
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 (comp_pad, "Have no caps yet");
|
||||
*width = 0;
|
||||
*height = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
pad_width =
|
||||
comp_pad->width <=
|
||||
0 ? GST_VIDEO_INFO_WIDTH (&vagg_pad->info) : comp_pad->width;
|
||||
|
|
Loading…
Reference in a new issue