diff --git a/gstlal-ugly/gst/lal/gstlal_interpolator.c b/gstlal-ugly/gst/lal/gstlal_interpolator.c index 13b1d623f72ee2eeb3f3f8eab12500697ee6254f..e65d727047339a5bace55357ede6a55b5386ee18 100644 --- a/gstlal-ugly/gst/lal/gstlal_interpolator.c +++ b/gstlal-ugly/gst/lal/gstlal_interpolator.c @@ -831,6 +831,7 @@ static GstFlowReturn transform(GstBaseTransform *trans, GstBuffer *inbuf, GstBuf guint output_length; GstFlowReturn result = GST_FLOW_OK; gboolean copied_nongap; + gboolean copied_nongap_all = FALSE; GstMapInfo mapinfo; g_assert(GST_BUFFER_PTS_IS_VALID(inbuf)); @@ -915,6 +916,9 @@ static GstFlowReturn transform(GstBaseTransform *trans, GstBuffer *inbuf, GstBuf else gst_audioadapter_copy_samples(element->adapter, element->workspace32->data, element->blocksampsin, NULL, &copied_nongap); + if (copied_nongap) + copied_nongap_all = TRUE; + if (element->outrate > element->inrate) upsample32(output, element->kernel32, element->workspace32->data, kernel_length(element), element->outrate / element->inrate, element->channels, element->blockstrideout, copied_nongap); else @@ -934,7 +938,7 @@ static GstFlowReturn transform(GstBaseTransform *trans, GstBuffer *inbuf, GstBuf processed += element->blockstrideout; } GST_INFO_OBJECT(element, "Processed a %d samples", processed); - set_metadata(element, outbuf, output_length, !copied_nongap); + set_metadata(element, outbuf, output_length, !copied_nongap_all); gst_buffer_unmap(outbuf, &mapinfo); } if (element->width == 64) { @@ -962,6 +966,9 @@ static GstFlowReturn transform(GstBaseTransform *trans, GstBuffer *inbuf, GstBuf else gst_audioadapter_copy_samples(element->adapter, element->workspace64->data, element->blocksampsin, NULL, &copied_nongap); + if (copied_nongap) + copied_nongap_all = TRUE; + if (element->outrate > element->inrate) upsample64(output, element->kernel64, element->workspace64->data, kernel_length(element), element->outrate / element->inrate, element->channels, element->blockstrideout, copied_nongap); else @@ -981,7 +988,7 @@ static GstFlowReturn transform(GstBaseTransform *trans, GstBuffer *inbuf, GstBuf processed += element->blockstrideout; } GST_INFO_OBJECT(element, "Processed a %d samples", processed); - set_metadata(element, outbuf, output_length, !copied_nongap); + set_metadata(element, outbuf, output_length, !copied_nongap_all); gst_buffer_unmap(outbuf, &mapinfo); } }