mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +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);
|
adder->pending_events = g_list_append (adder->pending_events, event);
|
||||||
event = NULL;
|
event = NULL;
|
||||||
break;
|
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;
|
discard = TRUE;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue