audioaggregator: Don't re-send the caps if they did not change

https://bugzilla.gnome.org/show_bug.cgi?id=740236
This commit is contained in:
Olivier Crête 2014-11-15 17:54:51 -05:00
parent 1eef58c3ce
commit acf7745188

View file

@ -635,11 +635,14 @@ gst_audio_aggregator_set_src_caps (GstAudioAggregator * aagg, GstCaps * caps)
GST_AUDIO_AGGREGATOR_LOCK (aagg);
GST_OBJECT_LOCK (aagg);
GST_INFO_OBJECT (aagg, "setting caps to %" GST_PTR_FORMAT, caps);
gst_caps_replace (&aagg->current_caps, caps);
if (!gst_audio_info_is_equal (&info, &aagg->info)) {
GST_INFO_OBJECT (aagg, "setting caps to %" GST_PTR_FORMAT, caps);
gst_caps_replace (&aagg->current_caps, caps);
memcpy (&aagg->info, &info, sizeof (info));
aagg->priv->send_caps = TRUE;
memcpy (&aagg->info, &info, sizeof (info));
aagg->priv->send_caps = TRUE;
}
GST_OBJECT_UNLOCK (aagg);
GST_AUDIO_AGGREGATOR_UNLOCK (aagg);