mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
videomixer: Fix negotiation with 0/1 framerates
https://bugzilla.gnome.org/show_bug.cgi?id=703743
This commit is contained in:
parent
beebe2b7af
commit
9e9d2ce098
1 changed files with 3 additions and 3 deletions
|
@ -194,7 +194,7 @@ gst_videomixer2_update_src_caps (GstVideoMixer2 * mix)
|
|||
width = GST_VIDEO_INFO_WIDTH (&mpad->info);
|
||||
height = GST_VIDEO_INFO_HEIGHT (&mpad->info);
|
||||
|
||||
if (fps_n == 0 || fps_d == 0 || width == 0 || height == 0)
|
||||
if (width == 0 || height == 0)
|
||||
continue;
|
||||
|
||||
this_width = width + MAX (mpad->xpos, 0);
|
||||
|
@ -217,7 +217,7 @@ gst_videomixer2_update_src_caps (GstVideoMixer2 * mix)
|
|||
}
|
||||
}
|
||||
|
||||
if (best_fps_n <= 0 && best_fps_d <= 0) {
|
||||
if (best_fps_n <= 0 || best_fps_d <= 0 || best_fps == 0.0) {
|
||||
best_fps_n = 25;
|
||||
best_fps_d = 1;
|
||||
best_fps = 25.0;
|
||||
|
@ -1660,7 +1660,7 @@ gst_videomixer2_sink_clip (GstCollectPads * pads,
|
|||
}
|
||||
|
||||
end_time = GST_BUFFER_DURATION (buf);
|
||||
if (end_time == -1)
|
||||
if (end_time == -1 && GST_VIDEO_INFO_FPS_N (&pad->info) != 0)
|
||||
end_time =
|
||||
gst_util_uint64_scale_int (GST_SECOND,
|
||||
GST_VIDEO_INFO_FPS_D (&pad->info), GST_VIDEO_INFO_FPS_N (&pad->info));
|
||||
|
|
Loading…
Reference in a new issue