summaryrefslogtreecommitdiffstats
path: root/gst/deinterlace2/gstdeinterlace2.c
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2009-04-17 15:39:10 +0200
committerDave Robillard <dave@drobilla.net>2009-05-03 12:03:15 -0400
commit390c8cd33977fb8730db614f02ab44ef11b59539 (patch)
tree5f58537a0892b2a6762fc688aa8f97656b84f5f2 /gst/deinterlace2/gstdeinterlace2.c
parent8974702c73811a419de9cb45614b19ee38f54b49 (diff)
downloadgst-plugins-bad-390c8cd33977fb8730db614f02ab44ef11b59539.tar.gz
gst-plugins-bad-390c8cd33977fb8730db614f02ab44ef11b59539.tar.bz2
gst-plugins-bad-390c8cd33977fb8730db614f02ab44ef11b59539.zip
deinterlace2: Fix timestamps for buffers with RFF flag set
Diffstat (limited to 'gst/deinterlace2/gstdeinterlace2.c')
-rw-r--r--gst/deinterlace2/gstdeinterlace2.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/gst/deinterlace2/gstdeinterlace2.c b/gst/deinterlace2/gstdeinterlace2.c
index 7bbe2494..3a42d0d5 100644
--- a/gst/deinterlace2/gstdeinterlace2.c
+++ b/gst/deinterlace2/gstdeinterlace2.c
@@ -734,18 +734,16 @@ gst_deinterlace2_push_history (GstDeinterlace2 * self, GstBuffer * buffer)
the timestamp of the buffer equals the first fields timestamp */
timestamp = GST_BUFFER_TIMESTAMP (buffer);
- if (repeated) {
- GST_BUFFER_TIMESTAMP (field1) = timestamp;
- GST_BUFFER_TIMESTAMP (field2) = timestamp + 2 * self->field_duration;
- } else {
- GST_BUFFER_TIMESTAMP (field1) = timestamp;
- GST_BUFFER_TIMESTAMP (field2) = timestamp + self->field_duration;
- }
+ GST_BUFFER_TIMESTAMP (field1) = timestamp;
+ GST_BUFFER_TIMESTAMP (field2) = timestamp + self->field_duration;
+ if (repeated)
+ GST_BUFFER_TIMESTAMP (field2) += self->field_duration;
if (repeated) {
self->field_history[0].buf = field2;
self->field_history[0].flags = field2_flags;
self->field_history[1].buf = gst_buffer_ref (field1);
+ GST_BUFFER_TIMESTAMP (self->field_history[1].buf) += self->field_duration;
self->field_history[1].flags = field1_flags;
self->field_history[2].buf = field1;
self->field_history[2].flags = field1_flags;