mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-25 00:28:21 +00:00
audioresample: push half a history length, instead of a full history length, at end-of-stream so that output segment and input segment have same duration
This commit is contained in:
parent
aac8b21678
commit
d6d2aa44ab
1 changed files with 8 additions and 4 deletions
|
@ -954,8 +954,10 @@ gst_audio_resample_event (GstBaseTransform * base, GstEvent * event)
|
|||
resample->need_discont = TRUE;
|
||||
break;
|
||||
case GST_EVENT_NEWSEGMENT:
|
||||
if (resample->state)
|
||||
gst_audio_resample_push_drain (resample, resample->num_nongap_samples);
|
||||
if (resample->state) {
|
||||
guint latency = resample->funcs->get_input_latency (resample->state);
|
||||
gst_audio_resample_push_drain (resample, latency);
|
||||
}
|
||||
gst_audio_resample_reset_state (resample);
|
||||
if (resample->state)
|
||||
resample->funcs->skip_zeros (resample->state);
|
||||
|
@ -969,8 +971,10 @@ gst_audio_resample_event (GstBaseTransform * base, GstEvent * event)
|
|||
resample->need_discont = TRUE;
|
||||
break;
|
||||
case GST_EVENT_EOS:
|
||||
if (resample->state)
|
||||
gst_audio_resample_push_drain (resample, resample->num_nongap_samples);
|
||||
if (resample->state) {
|
||||
guint latency = resample->funcs->get_input_latency (resample->state);
|
||||
gst_audio_resample_push_drain (resample, latency);
|
||||
}
|
||||
gst_audio_resample_reset_state (resample);
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue