From 9e9d2ce0989e238b2fbc2893104453dc2bb76228 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 9 Jul 2013 11:53:07 +0200 Subject: [PATCH] videomixer: Fix negotiation with 0/1 framerates https://bugzilla.gnome.org/show_bug.cgi?id=703743 --- gst/videomixer/videomixer2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gst/videomixer/videomixer2.c b/gst/videomixer/videomixer2.c index 90f9196..3fd07e4 100644 --- a/gst/videomixer/videomixer2.c +++ b/gst/videomixer/videomixer2.c @@ -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)); -- 2.7.4