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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2303>
This commit is contained in:
Mathieu Duponchelle 2022-04-27 00:27:06 +02:00 committed by GStreamer Marge Bot
parent 3c959ff53e
commit efc29565d6

View file

@ -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;
}