mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
init the values when the state hits playing so that we don't do dum things like log(0)
Original commit message from CVS: init the values when the state hits playing so that we don't do dum things like log(0)
This commit is contained in:
parent
312e46a540
commit
c4630dfcee
1 changed files with 18 additions and 14 deletions
|
@ -541,12 +541,12 @@ gst_dpman_state_change (GstElement *element, gint state, GstDParamManager *dpman
|
||||||
GstDParam *dparam;
|
GstDParam *dparam;
|
||||||
GstDParamWrapper *dpwrap;
|
GstDParamWrapper *dpwrap;
|
||||||
|
|
||||||
if (state == GST_STATE_PLAYING) return;
|
|
||||||
GST_DEBUG(GST_CAT_PARAMS, "initialising params\n");
|
|
||||||
|
|
||||||
g_return_if_fail (dpman != NULL);
|
g_return_if_fail (dpman != NULL);
|
||||||
g_return_if_fail (GST_IS_DPMAN (dpman));
|
g_return_if_fail (GST_IS_DPMAN (dpman));
|
||||||
|
|
||||||
|
if (state == GST_STATE_PLAYING){
|
||||||
|
GST_DEBUG(GST_CAT_PARAMS, "initialising params\n");
|
||||||
|
|
||||||
// force all params to be updated
|
// force all params to be updated
|
||||||
dwraps = GST_DPMAN_DPARAMS_LIST(dpman);
|
dwraps = GST_DPMAN_DPARAMS_LIST(dpman);
|
||||||
while (dwraps){
|
while (dwraps){
|
||||||
|
@ -555,9 +555,13 @@ gst_dpman_state_change (GstElement *element, gint state, GstDParamManager *dpman
|
||||||
|
|
||||||
if (dparam){
|
if (dparam){
|
||||||
GST_DPARAM_READY_FOR_UPDATE(dparam) = TRUE;
|
GST_DPARAM_READY_FOR_UPDATE(dparam) = TRUE;
|
||||||
|
if (dparam->spec){
|
||||||
|
g_value_copy(dparam->spec->default_val, GST_DPARAM_VALUE(dparam));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
dwraps = g_slist_next(dwraps);
|
dwraps = g_slist_next(dwraps);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue