Navigation Menu

Skip to content

Commit

Permalink
audioaggregator: Log if the sample rate of one sinkpad is not accepted
Browse files Browse the repository at this point in the history
Otherwise this can silently cause not-negotiated errors without any
direct hint about what went wrong.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1049>
  • Loading branch information
sdroege committed Feb 24, 2021
1 parent 740ea66 commit f5381ba
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion gst-libs/gst/audio/gstaudioaggregator.c
Expand Up @@ -900,7 +900,8 @@ gst_audio_aggregator_sink_setcaps (GstAudioAggregatorPad * aaggpad,
gboolean downstream_supports_rate = TRUE;

if (!gst_audio_info_from_caps (&info, caps)) {
GST_WARNING_OBJECT (agg, "Rejecting invalid caps: %" GST_PTR_FORMAT, caps);
GST_WARNING_OBJECT (aaggpad, "Rejecting invalid caps: %" GST_PTR_FORMAT,
caps);
return FALSE;
}

Expand Down Expand Up @@ -933,6 +934,10 @@ gst_audio_aggregator_sink_setcaps (GstAudioAggregatorPad * aaggpad,

if (!downstream_supports_rate || (first_configured_pad
&& info.rate != first_configured_pad->info.rate)) {
GST_WARNING_OBJECT (aaggpad,
"Sample rate %d can't be configured (downstream supported: %d, configured rate: %d)",
info.rate, downstream_supports_rate,
first_configured_pad ? first_configured_pad->info.rate : 0);
gst_pad_push_event (GST_PAD (aaggpad), gst_event_new_reconfigure ());
ret = FALSE;
} else {
Expand Down

0 comments on commit f5381ba

Please sign in to comment.