gst-plugins-bad: h264parse: mark byte-stream AU frame with inserted codec NALs as keyframe

Mark Nauwelaerts mnauw at kemper.freedesktop.org
Tue Jan 3 13:12:19 PST 2012


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

Author: Mark Nauwelaerts <mark.nauwelaerts at collabora.co.uk>
Date:   Tue Jan  3 21:59:32 2012 +0100

h264parse: mark byte-stream AU frame with inserted codec NALs as keyframe

---

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

diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c
index e9ea858..e1f92ee 100644
--- a/gst/videoparsers/gsth264parse.c
+++ b/gst/videoparsers/gsth264parse.c
@@ -1463,6 +1463,9 @@ gst_h264_parse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
           /* collect result and push */
           new_buf = gst_byte_writer_reset_and_get_buffer (&bw);
           gst_buffer_copy_metadata (new_buf, buffer, GST_BUFFER_COPY_ALL);
+          /* should already be keyframe/IDR, but it may not have been,
+           * so mark it as such to avoid being discarded by picky decoder */
+          GST_BUFFER_FLAG_UNSET (new_buf, GST_BUFFER_FLAG_DELTA_UNIT);
           gst_buffer_replace (&frame->buffer, new_buf);
           gst_buffer_unref (new_buf);
         }



More information about the gstreamer-commits mailing list