summaryrefslogtreecommitdiff
path: root/gst-libs/gst
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2012-09-11 10:59:33 +0200
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2012-09-11 17:08:47 +0200
commit6c19849cd2d273fdc67b6e8f6befd17e1fbb68fc (patch)
tree5c8d4e774751c21286ed7bc343770f444fb190c1 /gst-libs/gst
parente4d27fba6b9f6accadb7a428bf8423a41c5392f7 (diff)
decoder: propagate buffer duration downstream.
Diffstat (limited to 'gst-libs/gst')
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder.c b/gst-libs/gst/vaapi/gstvaapidecoder.c
index 148a6a23..c63bb149 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder.c
+++ b/gst-libs/gst/vaapi/gstvaapidecoder.c
@@ -129,10 +129,16 @@ static inline void
push_surface(GstVaapiDecoder *decoder, GstVaapiSurfaceProxy *proxy)
{
GstVaapiDecoderPrivate * const priv = decoder->priv;
+ GstClockTime duration;
GST_DEBUG("queue decoded surface %" GST_VAAPI_ID_FORMAT,
GST_VAAPI_ID_ARGS(gst_vaapi_surface_proxy_get_surface_id(proxy)));
+ if (priv->fps_n && priv->fps_d) {
+ /* Actual field duration is computed in vaapipostproc */
+ duration = gst_util_uint64_scale(GST_SECOND, priv->fps_d, priv->fps_n);
+ gst_vaapi_surface_proxy_set_duration(proxy, duration);
+ }
g_queue_push_tail(priv->surfaces, proxy);
}