diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2014-03-28 18:27:16 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2014-03-29 10:33:45 +0100 |
commit | 10ffa089a05a229e1bdbbfdcdba8e61438154664 (patch) | |
tree | 8029d1e03757614cde29ec5a6e87bc285197f624 /gst | |
parent | 986c8782e4860643228c2c25778d7a3995ccaf4e (diff) | |
download | gstreamer-plugins-bad-10ffa089a05a229e1bdbbfdcdba8e61438154664.tar.gz |
h264parse: Copy over DISCONT flag from input buffers
Diffstat (limited to 'gst')
-rw-r--r-- | gst/videoparsers/gsth264parse.c | 12 | ||||
-rw-r--r-- | gst/videoparsers/gsth264parse.h | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c index c641fb008..9105d7f5a 100644 --- a/gst/videoparsers/gsth264parse.c +++ b/gst/videoparsers/gsth264parse.c @@ -211,6 +211,8 @@ gst_h264_parse_reset (GstH264Parse * h264parse) h264parse->pending_key_unit_ts = GST_CLOCK_TIME_NONE; h264parse->force_key_unit_event = NULL; + h264parse->discont = FALSE; + gst_h264_parse_reset_frame (h264parse); } @@ -809,6 +811,11 @@ gst_h264_parse_handle_frame (GstBaseParse * parse, GstH264ParserResult pres; gint framesize; + if (G_UNLIKELY (GST_BUFFER_FLAG_IS_SET (frame->buffer, + GST_BUFFER_FLAG_DISCONT))) { + h264parse->discont = TRUE; + } + /* delegate in packetized case, no skipping should be needed */ if (h264parse->packetized) return gst_h264_parse_handle_frame_packetized (parse, frame); @@ -1457,6 +1464,11 @@ gst_h264_parse_parse_frame (GstBaseParse * parse, GstBaseParseFrame * frame) else GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT); + if (h264parse->discont) { + GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_DISCONT); + h264parse->discont = FALSE; + } + /* replace with transformed AVC output if applicable */ av = gst_adapter_available (h264parse->frame_out); if (av) { diff --git a/gst/videoparsers/gsth264parse.h b/gst/videoparsers/gsth264parse.h index d8eb4d94d..4c3fdd4d1 100644 --- a/gst/videoparsers/gsth264parse.h +++ b/gst/videoparsers/gsth264parse.h @@ -97,6 +97,8 @@ struct _GstH264Parse GstClockTime ts_trn_nb; gboolean do_ts; + gboolean discont; + /* frame parsing */ /*guint last_nal_pos;*/ /*guint next_sc_pos;*/ |