[gst-cvs] gst-plugins-bad: h264parse: also collect SPS and PPS nalu in codec_data

Mark Nauwelaerts mnauw at kemper.freedesktop.org
Mon Jun 14 03:52:25 PDT 2010


Module: gst-plugins-bad
Branch: master
Commit: 3a1fad60997f492ac3bdcaa22ccbed3e50ee8239
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=3a1fad60997f492ac3bdcaa22ccbed3e50ee8239

Author: Mark Nauwelaerts <mark.nauwelaerts at collabora.co.uk>
Date:   Wed Jun  9 15:32:14 2010 +0200

h264parse: also collect SPS and PPS nalu in codec_data

---

 gst/h264parse/gsth264parse.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/gst/h264parse/gsth264parse.c b/gst/h264parse/gsth264parse.c
index 7351d90..af433c5 100644
--- a/gst/h264parse/gsth264parse.c
+++ b/gst/h264parse/gsth264parse.c
@@ -1383,6 +1383,11 @@ gst_h264_parse_sink_setcaps (GstPad * pad, GstCaps * caps)
         goto avcc_too_small;
       gst_nal_bs_init (&bs, data + 2 + 1, len - 1);
       gst_nal_decode_sps (h264parse, &bs);
+      /* store for later use, e.g. insertion */
+      if (h264parse->sps) {
+        h264parse->sps_nals[h264parse->sps->sps_id] =
+            gst_h264_parse_make_nal (h264parse, data + 2, len);
+      }
       if (h264parse->format == GST_H264_PARSE_FORMAT_BYTE)
         nlist = g_slist_append (nlist,
             gst_h264_parse_make_nal (h264parse, data + 2, len));
@@ -1398,6 +1403,11 @@ gst_h264_parse_sink_setcaps (GstPad * pad, GstCaps * caps)
         goto avcc_too_small;
       gst_nal_bs_init (&bs, data + 2 + 1, len - 1);
       gst_nal_decode_pps (h264parse, &bs);
+      /* store for later use, e.g. insertion */
+      if (h264parse->pps) {
+        h264parse->pps_nals[h264parse->pps->pps_id] =
+            gst_h264_parse_make_nal (h264parse, data + 2, len);
+      }
       if (h264parse->format == GST_H264_PARSE_FORMAT_BYTE)
         nlist = g_slist_append (nlist,
             gst_h264_parse_make_nal (h264parse, data + 2, len));





More information about the Gstreamer-commits mailing list