From a4663010574e2397a7f31ddec9712d9ddb435e47 Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Fri, 14 Sep 2001 19:15:32 +0000 Subject: [PATCH] use gst_dparam_attach, check for boolean and timestamp before updating Original commit message from CVS: use gst_dparam_attach, check for boolean and timestamp before updating --- gst/gstdparammanager.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/gst/gstdparammanager.c b/gst/gstdparammanager.c index 6ce973b73e..37e6241258 100644 --- a/gst/gstdparammanager.c +++ b/gst/gstdparammanager.c @@ -276,10 +276,8 @@ gst_dpman_attach_dparam (GstDParamManager *dpman, gchar *dparam_name, GstDParam g_return_val_if_fail(dpwrap != NULL, FALSE); g_return_val_if_fail(dpwrap->value != NULL, FALSE); - GST_DPARAM_VALUE(dparam) = dpwrap->value; dpwrap->dparam = dparam; - gst_dparam_set_parent (dparam, GST_OBJECT(dpman)); - GST_DPARAM_NAME(dparam) = dparam_name; + gst_dparam_attach(dparam, GST_OBJECT(dpman), dparam_name, dpwrap->value); return TRUE; } @@ -551,8 +549,8 @@ gst_dpman_preprocess_synchronous(GstDParamManager *dpman, guint frames, gint64 t dpwrap = (GstDParamWrapper*)dwraps->data; dparam = dpwrap->dparam; - if (dparam && (GST_DPARAM_READY_FOR_UPDATE(dparam) || - (GST_DPARAM_NEXT_UPDATE_TIMESTAMP(dparam) < timestamp))){ + if (dparam && (GST_DPARAM_READY_FOR_UPDATE(dparam) && + (GST_DPARAM_NEXT_UPDATE_TIMESTAMP(dparam) <= timestamp))){ // this will make dpwrap->value contain the latest value. // now we just need to get it to the element