mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
adder: be more graceful in the clipfunction
Doing dynamic pipelines is hard in 0.10. As we don't have the sticky events in 0.10 and sending such events in special elements like adder and tee was outvoted on last attempt, be graceful to the misbehaviour instead.
This commit is contained in:
parent
3c87d7dc77
commit
0cce8ab97d
1 changed files with 8 additions and 2 deletions
|
@ -1016,8 +1016,14 @@ gst_adder_do_clip (GstCollectPads * pads, GstCollectData * data,
|
|||
{
|
||||
GstAdder *adder = GST_ADDER (user_data);
|
||||
|
||||
buffer = gst_audio_buffer_clip (buffer, &data->segment, adder->rate,
|
||||
adder->bps);
|
||||
/* in 0.10 the application might need to seek on newly added source-branches
|
||||
* to make it send a newsegment, that is hard to sync and so the segment might
|
||||
* not be initialized. Check this here to not trigger the assertion
|
||||
*/
|
||||
if (data->segment.format != GST_FORMAT_UNDEFINED) {
|
||||
buffer = gst_audio_buffer_clip (buffer, &data->segment, adder->rate,
|
||||
adder->bps);
|
||||
}
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue