From: Robert Swain Date: Mon, 22 Nov 2010 14:26:06 +0000 (+0100) Subject: interlace: Fix buffer timestamp and duration X-Git-Tag: 1.19.3~507^2~16131 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0de362f248bf0ba5c5f2a7e5e87198f5a17ca60f;p=platform%2Fupstream%2Fgstreamer.git interlace: Fix buffer timestamp and duration The field rate is twice the frame rate of the src pad and so the duration of one output buffer is src_fps_d / (2 * src_fps_n). --- diff --git a/gst/interlace/gstinterlace.c b/gst/interlace/gstinterlace.c index d8b7f2ed3d..c6181ecad5 100644 --- a/gst/interlace/gstinterlace.c +++ b/gst/interlace/gstinterlace.c @@ -327,13 +327,14 @@ static void gst_interlace_decorate_buffer (GstInterlace * interlace, GstBuffer * buf, int n_fields) { + /* field duration = src_fps_d / (2 * src_fps_n) */ GST_BUFFER_TIMESTAMP (buf) = interlace->timebase + gst_util_uint64_scale (GST_SECOND, interlace->src_fps_d * interlace->fields_since_timebase, - interlace->src_fps_n); + interlace->src_fps_n * 2); GST_BUFFER_DURATION (buf) = gst_util_uint64_scale (GST_SECOND, interlace->src_fps_d * n_fields, - interlace->src_fps_n); + interlace->src_fps_n * 2); /* increment the buffer timestamp by duration for the next buffer */ gst_buffer_set_caps (buf, interlace->srccaps);