From dcd2ee421a90cba280b5c8abfb0f1c39bd4d8780 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Tue, 3 Jan 2012 21:59:32 +0100 Subject: [PATCH] h264parse: mark byte-stream AU frame with inserted codec NALs as keyframe --- gst/videoparsers/gsth264parse.c | 3 +++ 1 file changed, 3 insertions(+) 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); } -- 2.7.4