mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
decoder: propagate buffer duration downstream.
This commit is contained in:
parent
e4d27fba6b
commit
6c19849cd2
2 changed files with 7 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -229,6 +229,7 @@ gst_vaapidecode_step(GstVaapiDecode *decode)
|
|||
goto error_create_buffer;
|
||||
|
||||
GST_BUFFER_TIMESTAMP(buffer) = GST_VAAPI_SURFACE_PROXY_TIMESTAMP(proxy);
|
||||
GST_BUFFER_DURATION(buffer) = GST_VAAPI_SURFACE_PROXY_DURATION(proxy);
|
||||
gst_buffer_set_caps(buffer, GST_PAD_CAPS(decode->srcpad));
|
||||
|
||||
if (GST_VAAPI_SURFACE_PROXY_TFF(proxy))
|
||||
|
|
Loading…
Reference in a new issue