From 5b11e6a3d07018f88f29a28c28030b37578f8809 Mon Sep 17 00:00:00 2001 From: "dongil.park" Date: Wed, 27 Apr 2022 12:24:23 +0900 Subject: [PATCH] wavparse: Unset DISCONT buffer flag for divided into multiple buffers in push mode In push mode (streaming), if the received chunk buffer size from _chain is bigger than output buffer size, the flags of the divided-buffers are propagated to the DISCONT flag from first received chunk buffer. This unexpected buffers contained DISCONT flags are abnormally transformed when changing the sampling rate by audioresample element. So unset unnecessary DISCONT flag before pad_push(). Part-of: --- subprojects/gst-plugins-good/gst/wavparse/gstwavparse.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/subprojects/gst-plugins-good/gst/wavparse/gstwavparse.c b/subprojects/gst-plugins-good/gst/wavparse/gstwavparse.c index f7b218f..038bc9c 100644 --- a/subprojects/gst-plugins-good/gst/wavparse/gstwavparse.c +++ b/subprojects/gst-plugins-good/gst/wavparse/gstwavparse.c @@ -2158,6 +2158,8 @@ iterate_adapter: GST_DEBUG_OBJECT (wav, "marking DISCONT"); GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DISCONT); wav->discont = FALSE; + } else { + GST_BUFFER_FLAG_UNSET (buf, GST_BUFFER_FLAG_DISCONT); } GST_BUFFER_TIMESTAMP (buf) = timestamp; -- 2.7.4