mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-24 16:18:16 +00:00
kate: mark header buffers as such
This commit is contained in:
parent
8da7230c88
commit
46f979a839
3 changed files with 6 additions and 5 deletions
|
@ -606,6 +606,7 @@ gst_kate_enc_send_headers (GstKateEnc * ke)
|
|||
}
|
||||
kate_packet_clear (&kp);
|
||||
|
||||
GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_HEADER);
|
||||
headers = g_list_append (headers, buffer);
|
||||
} else if (ret > 0) {
|
||||
GST_LOG_OBJECT (ke, "Last header encoded");
|
||||
|
|
|
@ -200,6 +200,7 @@ gst_kate_parse_push_headers (GstKateParse * parse)
|
|||
}
|
||||
gst_buffer_unmap (outbuf, &info);
|
||||
/* takes ownership of outbuf, which was previously in parse->streamheader */
|
||||
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_HEADER);
|
||||
outbuf_list = g_list_append (outbuf_list, outbuf);
|
||||
headers = headers->next;
|
||||
}
|
||||
|
|
|
@ -61,17 +61,16 @@ gst_kate_util_set_header_on_caps (GstElement * element, GstCaps * caps,
|
|||
GstBuffer *buffer = headers->data;
|
||||
g_assert (buffer);
|
||||
g_value_init (&value, GST_TYPE_BUFFER);
|
||||
/* as in theoraenc, we need to copy to avoid circular references */
|
||||
buffer = gst_buffer_copy (buffer);
|
||||
gst_value_set_buffer (&value, buffer);
|
||||
gst_buffer_unref (buffer);
|
||||
GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_HEADER);
|
||||
gst_value_take_buffer (&value, buffer);
|
||||
gst_value_array_append_value (&array, &value);
|
||||
g_value_unset (&value);
|
||||
headers = headers->next;
|
||||
}
|
||||
|
||||
gst_structure_set_value (structure, "streamheader", &array);
|
||||
g_value_unset (&array);
|
||||
gst_structure_take_value (structure, "streamheader", &array);
|
||||
|
||||
GST_LOG_OBJECT (element, "here are the newly set caps: %" GST_PTR_FORMAT,
|
||||
caps);
|
||||
|
||||
|
|
Loading…
Reference in a new issue