mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
h264parse: Copy over DISCONT flag from input buffers
This commit is contained in:
parent
986c8782e4
commit
10ffa089a0
2 changed files with 14 additions and 0 deletions
|
@ -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;*/
|
||||
|
|
Loading…
Reference in a new issue