audioencoder: avoid setting output caps twice

... which may not be handled or appreciated well downstream,
e.g. muxers only performing header setup once.
This commit is contained in:
Mark Nauwelaerts 2012-07-25 15:51:45 +02:00
parent f1c583bde3
commit 28537dc73c

View file

@ -2530,6 +2530,9 @@ gst_audio_encoder_set_output_format (GstAudioEncoder * enc, GstCaps * caps)
if (!res)
goto done;
/* clear reconfigure so we don't set caps twice */
gst_pad_check_reconfigure (enc->srcpad);
query = gst_query_new_allocation (caps, TRUE);
if (!gst_pad_peer_query (enc->srcpad, query)) {
GST_DEBUG_OBJECT (enc, "didn't get downstream ALLOCATION hints");