summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Gritsay <anton@angri.ru>2013-03-18 12:59:00 +0000
committerOlivier CrĂȘte <olivier.crete@collabora.com>2013-06-11 18:07:04 -0400
commitdc1ca0fd9022215087aa4cd57a1d446899dc410b (patch)
treec0b22ef0ab4cf538fbbd74c2d2912550dc211a7d
parent2086e96db54701451458c49372b17119a4211f1f (diff)
downloadgstreamer-plugins-bad-dc1ca0fd9022215087aa4cd57a1d446899dc410b.tar.gz
h264parse: Add access-unit-delimiters
https://bugzilla.gnome.org/show_bug.cgi?id=696037
-rw-r--r--gst/videoparsers/gsth264parse.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c
index d398dbb9a..38ad34e43 100644
--- a/gst/videoparsers/gsth264parse.c
+++ b/gst/videoparsers/gsth264parse.c
@@ -1470,6 +1470,17 @@ gst_h264_parse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
gst_h264_parse_prepare_key_unit (h264parse, event);
}
+ char au_delim[] = { 0x00, 0x00, 0x00, 0x01, /* nal prefix */
+ 0x09, /* nal_unit_type = access unit delimiter */
+ 0xf0 /* allow any slice type */ };
+ GstBuffer *au_delim_buf = gst_buffer_new_allocate (
+ NULL, sizeof (au_delim), NULL);
+ gst_buffer_fill (au_delim_buf, 0, au_delim, sizeof (au_delim));
+ GST_BUFFER_TIMESTAMP (au_delim_buf) = GST_BUFFER_TIMESTAMP (buffer);
+ GST_BUFFER_DURATION (au_delim_buf) = 0;
+ GST_DEBUG_OBJECT (h264parse, "sending AU delimiter");
+ gst_pad_push (GST_BASE_PARSE_SRC_PAD (h264parse), au_delim_buf);
+
/* periodic SPS/PPS sending */
if (h264parse->interval > 0 || h264parse->push_codec) {
GstClockTime timestamp = GST_BUFFER_TIMESTAMP (buffer);