From efc29565d6c5444b4eb228d0b68fb76322a48eb0 Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Wed, 27 Apr 2022 00:27:06 +0200 Subject: [PATCH] rtponviftimestamp: add extension data to all packets .. regardless of whether they are input as individual buffers or buffer lists. The ONVIF specification requires all packets to hold the extension, it makes no sense to behave differently when handling buffer lists. Part-of: --- .../gst/onvif/gstrtponviftimestamp.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/subprojects/gst-plugins-bad/gst/onvif/gstrtponviftimestamp.c b/subprojects/gst-plugins-bad/gst/onvif/gstrtponviftimestamp.c index f0d5533ab6..50706665b1 100644 --- a/subprojects/gst-plugins-bad/gst/onvif/gstrtponviftimestamp.c +++ b/subprojects/gst-plugins-bad/gst/onvif/gstrtponviftimestamp.c @@ -732,15 +732,18 @@ gst_rtp_onvif_timestamp_chain (GstPad * pad, GstObject * parent, return result; } +static gboolean +do_handle_buffer (GstBuffer ** buffer, guint idx, GstRtpOnvifTimestamp * self) +{ + return handle_buffer (self, *buffer); +} + /* @buf: (transfer full) */ static GstFlowReturn handle_and_push_buffer_list (GstRtpOnvifTimestamp * self, GstBufferList * list) { - GstBuffer *buf; - - /* Set the extension on the *first* buffer */ - buf = gst_buffer_list_get (list, 0); - if (!handle_buffer (self, buf)) { + if (!gst_buffer_list_foreach (list, (GstBufferListFunc) do_handle_buffer, + self)) { gst_buffer_list_unref (list); return GST_FLOW_ERROR; }