mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
adder: Reject segments that have a different rate than the output segment
adder does no rate conversion.
This commit is contained in:
parent
4465741222
commit
15375861b5
1 changed files with 12 additions and 1 deletions
|
@ -868,9 +868,20 @@ gst_adder_sink_event (GstCollectPads * pads, GstCollectData * pad,
|
|||
adder->pending_events = g_list_append (adder->pending_events, event);
|
||||
event = NULL;
|
||||
break;
|
||||
case GST_EVENT_SEGMENT:
|
||||
case GST_EVENT_SEGMENT:{
|
||||
const GstSegment *segment;
|
||||
gst_event_parse_segment (event, &segment);
|
||||
if (segment->rate != adder->segment.rate) {
|
||||
GST_ERROR_OBJECT (pad->pad,
|
||||
"Got segment event with wrong rate %lf, expected %lf",
|
||||
segment->rate, adder->segment.rate);
|
||||
res = FALSE;
|
||||
gst_event_unref (event);
|
||||
event = NULL;
|
||||
}
|
||||
discard = TRUE;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue