audiovisualizer: Negotiate as soon as possible when getting the sinkpad caps

This commit is contained in:
Sebastian Dröge 2013-05-15 11:00:46 +02:00
parent 71c131b63c
commit 3d09d0068d

View file

@ -709,7 +709,9 @@ gst_audio_visualizer_sink_setcaps (GstAudioVisualizer * scope, GstCaps * caps)
GST_DEBUG_OBJECT (scope, "audio: channels %d, rate %d",
GST_AUDIO_INFO_CHANNELS (&info), GST_AUDIO_INFO_RATE (&info));
gst_pad_mark_reconfigure (scope->srcpad);
if (!gst_audio_visualizer_src_negotiate (scope)) {
goto not_negotiated;
}
return TRUE;
@ -719,6 +721,11 @@ wrong_caps:
GST_WARNING_OBJECT (scope, "could not parse caps");
return FALSE;
}
not_negotiated:
{
GST_WARNING_OBJECT (scope, "failed to negotiate");
return FALSE;
}
}
static gboolean