From: Matthew Waters Date: Tue, 3 May 2022 07:27:32 +0000 (+1000) Subject: wavparse: ensure that any pending segment is sent before an EOS event is sent X-Git-Tag: 1.22.0~1679 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f4f342aa7827834d486c7320be28c878eb27c4b0;p=platform%2Fupstream%2Fgstreamer.git wavparse: ensure that any pending segment is sent before an EOS event is sent Specifically fixes seqnum handling when an aggregator-based element (audiomixer et al) is downstream and a seek is performed that immediately causes an EOS from wavparse. Part-of: --- diff --git a/subprojects/gst-plugins-good/gst/wavparse/gstwavparse.c b/subprojects/gst-plugins-good/gst/wavparse/gstwavparse.c index 038bc9c..6069dee 100644 --- a/subprojects/gst-plugins-good/gst/wavparse/gstwavparse.c +++ b/subprojects/gst-plugins-good/gst/wavparse/gstwavparse.c @@ -2289,6 +2289,13 @@ pause: if (G_UNLIKELY (wav->first)) { wav->first = FALSE; gst_wavparse_add_src_pad (wav, NULL); + } else { + /* If we have a pending start segment, send it now. Can happen if a seek + * causes an immediate EOS */ + if (G_UNLIKELY (wav->start_segment != NULL)) { + gst_pad_push_event (wav->srcpad, wav->start_segment); + wav->start_segment = NULL; + } } /* perform EOS logic */