diff --git a/gst/audioconvert/gstaudioconvert.c b/gst/audioconvert/gstaudioconvert.c index 2269e0a8dc..5af83cf6ac 100644 --- a/gst/audioconvert/gstaudioconvert.c +++ b/gst/audioconvert/gstaudioconvert.c @@ -328,7 +328,7 @@ remove_channels_from_structure (GstCapsFeatures * features, GstStructure * s, /* Only remove the channels and channel-mask for non-NONE layouts, * or if a mix matrix was manually specified */ - if (this->mix_matrix_was_set || + if (this->mix_matrix_is_set || !gst_structure_get (s, "channel-mask", GST_TYPE_BITMASK, &mask, NULL) || (mask != 0 || (gst_structure_get_int (s, "channels", &channels) && channels == 1))) { @@ -763,7 +763,7 @@ gst_audio_convert_set_caps (GstBaseTransform * base, GstCaps * incaps, GST_AUDIO_CONVERTER_OPT_NOISE_SHAPING_METHOD, GST_TYPE_AUDIO_NOISE_SHAPING_METHOD, this->ns, NULL); - if (this->mix_matrix_was_set) + if (this->mix_matrix_is_set) gst_structure_set_value (config, GST_AUDIO_CONVERTER_OPT_MIX_MATRIX, &this->mix_matrix); @@ -976,17 +976,16 @@ gst_audio_convert_set_property (GObject * object, guint prop_id, break; case PROP_MIX_MATRIX: if (!gst_value_array_get_size (value)) { - g_value_copy (value, &this->mix_matrix); - this->mix_matrix_was_set = TRUE; + this->mix_matrix_is_set = FALSE; } else { const GValue *first_row = gst_value_array_get_value (value, 0); if (gst_value_array_get_size (first_row)) { - if (gst_value_array_get_size (&this->mix_matrix)) - g_value_unset (&this->mix_matrix); - g_value_copy (value, &this->mix_matrix); - this->mix_matrix_was_set = TRUE; + this->mix_matrix_is_set = TRUE; + + /* issue a reconfigure upstream */ + gst_base_transform_reconfigure_sink (GST_BASE_TRANSFORM (this)); } else { g_warning ("Empty mix matrix's first row"); } @@ -1012,7 +1011,7 @@ gst_audio_convert_get_property (GObject * object, guint prop_id, g_value_set_enum (value, this->ns); break; case PROP_MIX_MATRIX: - if (this->mix_matrix_was_set) + if (this->mix_matrix_is_set) g_value_copy (&this->mix_matrix, value); break; default: diff --git a/gst/audioconvert/gstaudioconvert.h b/gst/audioconvert/gstaudioconvert.h index 3efbfe08aa..8befffd815 100644 --- a/gst/audioconvert/gstaudioconvert.h +++ b/gst/audioconvert/gstaudioconvert.h @@ -48,7 +48,7 @@ struct _GstAudioConvert GstAudioDitherMethod dither; GstAudioNoiseShapingMethod ns; GValue mix_matrix; - gboolean mix_matrix_was_set; + gboolean mix_matrix_is_set; GstAudioInfo in_info; GstAudioInfo out_info;