schroenc: set buffer offset to buffer timestamp
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Mon, 13 Jan 2014 10:01:43 +0000 (10:01 +0000)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 4 Feb 2014 15:47:23 +0000 (16:47 +0100)
oggmux expects this to order incoming buffers

https://bugzilla.gnome.org/show_bug.cgi?id=722078

ext/schroedinger/gstschroenc.c

index 1c3c8d3fed459e450964d39d1196345831891368..a584740f7595428c3f3bd687a5b62280d6132b48 100644 (file)
@@ -690,6 +690,10 @@ gst_schro_enc_pre_push (GstVideoEncoder * base_video_encoder,
   }
 #endif
 
+  GST_BUFFER_OFFSET (buf) = gst_util_uint64_scale (schro_enc->last_granulepos,
+      GST_SECOND * schro_enc->video_format->frame_rate_denominator,
+      schro_enc->video_format->frame_rate_numerator);
+
   return GST_FLOW_OK;
 }