Commit 10ffa089 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

h264parse: Copy over DISCONT flag from input buffers

parent 986c8782
......@@ -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) {
......
......@@ -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;*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment