diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2014-11-12 13:58:56 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2014-11-12 13:59:23 +0100 |
commit | 411795560f809b7954347ed57b2f3b38dcfcea04 (patch) | |
tree | 2a837358234cf359dff13d7fcbb8ab2f2ad2996e /gst/inter | |
parent | 92796446a23bae05cf3fd70cfe161f04e0dac980 (diff) |
intervideosrc: Stop showing the current frame after 1 second, not after 30 frames
Diffstat (limited to 'gst/inter')
-rw-r--r-- | gst/inter/gstintervideosrc.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gst/inter/gstintervideosrc.c b/gst/inter/gstintervideosrc.c index 2a64f267f..8c24b0760 100644 --- a/gst/inter/gstintervideosrc.c +++ b/gst/inter/gstintervideosrc.c @@ -337,6 +337,11 @@ gst_inter_video_src_create (GstBaseSrc * src, guint64 offset, guint size, } } if (intervideosrc->surface->video_buffer) { + gint fps = + 0.5 + + ((gdouble) GST_VIDEO_INFO_FPS_N (&intervideosrc->info)) / + ((gdouble) GST_VIDEO_INFO_FPS_D (&intervideosrc->info)); + buffer = gst_buffer_ref (intervideosrc->surface->video_buffer); /* Repeated buffer? */ @@ -344,10 +349,10 @@ gst_inter_video_src_create (GstBaseSrc * src, guint64 offset, guint size, is_gap = TRUE; intervideosrc->surface->video_buffer_count++; - if (intervideosrc->surface->video_buffer_count >= 30) { + if (intervideosrc->surface->video_buffer_count >= fps) { /* The first black buffer is not a GAP anymore but * the following are */ - if (intervideosrc->surface->video_buffer_count == 30) + if (intervideosrc->surface->video_buffer_count == fps) is_gap = FALSE; gst_buffer_unref (intervideosrc->surface->video_buffer); |