From 3064a065af742113b0cfea874b4cf0da6c419b89 Mon Sep 17 00:00:00 2001 From: Marianna Smidth Buschle Date: Wed, 4 Aug 2021 14:22:09 +0200 Subject: [PATCH] Fix restart-ts for multiple listeners Fix invalid PTS/DTS for the case where there are multiple listeners with different stream-sync settings: fx one with restart-ts and the other with passthrough-ts. The restart-ts branch was invalidating the PTS and DTS which would also affect the other branch since the buffer wasn't ensured as writable. --- gst/interpipe/gstinterpipesrc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gst/interpipe/gstinterpipesrc.c b/gst/interpipe/gstinterpipesrc.c index 4d16267..632024b 100644 --- a/gst/interpipe/gstinterpipesrc.c +++ b/gst/interpipe/gstinterpipesrc.c @@ -671,6 +671,7 @@ gst_inter_pipe_src_push_buffer (GstInterPipeIListener * iface, GST_TIME_ARGS (GST_BUFFER_PTS (buffer))); } else if (GST_INTER_PIPE_SRC_RESTART_TIMESTAMP == src->stream_sync) { /* Remove the incoming timestamp to be generated according this basetime */ + buffer = gst_buffer_make_writable (buffer); GST_BUFFER_PTS (buffer) = GST_CLOCK_TIME_NONE; GST_BUFFER_DTS (buffer) = GST_CLOCK_TIME_NONE; }