diff options
author | Seungha Yang <seungha.yang@navercorp.com> | 2018-08-14 00:27:12 +0900 |
---|---|---|
committer | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2018-09-10 22:36:59 -0400 |
commit | 7032b6a454bef6df5cb8f8dd3e766ba96f051347 (patch) | |
tree | e29abcb19e9a7d4057297ccefafeb004d1992d6f | |
parent | b7bc4b4cb51349bf9a67a20bb8be6787877dbbca (diff) |
h265parse: Copy over DISCONT flag from input buffers
Apply the commit 10ffa08
https://bugzilla.gnome.org/show_bug.cgi?id=754124
-rw-r--r-- | gst/videoparsers/gsth265parse.c | 12 | ||||
-rw-r--r-- | gst/videoparsers/gsth265parse.h | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/gst/videoparsers/gsth265parse.c b/gst/videoparsers/gsth265parse.c index d68423e0f..56ace3d8c 100644 --- a/gst/videoparsers/gsth265parse.c +++ b/gst/videoparsers/gsth265parse.c @@ -201,6 +201,8 @@ gst_h265_parse_reset (GstH265Parse * h265parse) h265parse->pending_key_unit_ts = GST_CLOCK_TIME_NONE; h265parse->force_key_unit_event = NULL; + h265parse->discont = FALSE; + gst_h265_parse_reset_frame (h265parse); } @@ -833,6 +835,11 @@ gst_h265_parse_handle_frame (GstBaseParse * parse, GstH265ParserResult pres; gint framesize; + if (G_UNLIKELY (GST_BUFFER_FLAG_IS_SET (frame->buffer, + GST_BUFFER_FLAG_DISCONT))) { + h265parse->discont = TRUE; + } + /* delegate in packetized case, no skipping should be needed */ if (h265parse->packetized) return gst_h265_parse_handle_frame_packetized (parse, frame); @@ -1721,6 +1728,11 @@ gst_h265_parse_parse_frame (GstBaseParse * parse, GstBaseParseFrame * frame) else GST_BUFFER_FLAG_UNSET (buffer, GST_BUFFER_FLAG_HEADER); + if (h265parse->discont) { + GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT); + h265parse->discont = FALSE; + } + /* replace with transformed HEVC output if applicable */ av = gst_adapter_available (h265parse->frame_out); if (av) { diff --git a/gst/videoparsers/gsth265parse.h b/gst/videoparsers/gsth265parse.h index 91e84ab1f..d1ab86f4a 100644 --- a/gst/videoparsers/gsth265parse.h +++ b/gst/videoparsers/gsth265parse.h @@ -78,6 +78,8 @@ struct _GstH265Parse GstBuffer *sps_nals[GST_H265_MAX_SPS_COUNT]; GstBuffer *pps_nals[GST_H265_MAX_PPS_COUNT]; + gboolean discont; + /* frame parsing */ gint idr_pos, sei_pos; gboolean update_caps; |