summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeungha Yang <seungha@centricular.com>2021-06-17 01:00:33 +0900
committerTim-Philipp Müller <tim@centricular.com>2021-06-22 15:03:54 +0100
commit13ef98406abd96e2e0b79300006eecb8f35251c5 (patch)
tree4be1368b306c7ff314140650094e22bab85aa740
parent4e1adef05598e9d4b6c5ae4e95b1695019b41cf9 (diff)
downloadgstreamer-plugins-bad-13ef98406abd96e2e0b79300006eecb8f35251c5.tar.gz
h264parse,h265parse: Push parameter set NAL units again per segment-done
Some decoder implementations might drain out internal buffers and reset its status on segment-done event. So, in case that upstream stream-format is packetized but downstream supports only byte-format, required codec-data might not be forwarded toward downstream if such parameter set NAL units don't exist in inband bitstream. Therefore, parse elements should re-send parameter set NAL units like the case of flush event. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2351>
-rw-r--r--gst/videoparsers/gsth264parse.c1
-rw-r--r--gst/videoparsers/gsth265parse.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c
index 7d04339b7..6260a5f23 100644
--- a/gst/videoparsers/gsth264parse.c
+++ b/gst/videoparsers/gsth264parse.c
@@ -3577,6 +3577,7 @@ gst_h264_parse_event (GstBaseParse * parse, GstEvent * event)
break;
}
case GST_EVENT_FLUSH_STOP:
+ case GST_EVENT_SEGMENT_DONE:
h264parse->dts = GST_CLOCK_TIME_NONE;
h264parse->ts_trn_nb = GST_CLOCK_TIME_NONE;
h264parse->push_codec = TRUE;
diff --git a/gst/videoparsers/gsth265parse.c b/gst/videoparsers/gsth265parse.c
index c5e5c065f..32f23d875 100644
--- a/gst/videoparsers/gsth265parse.c
+++ b/gst/videoparsers/gsth265parse.c
@@ -3128,6 +3128,7 @@ gst_h265_parse_event (GstBaseParse * parse, GstEvent * event)
break;
}
case GST_EVENT_FLUSH_STOP:
+ case GST_EVENT_SEGMENT_DONE:
h265parse->push_codec = TRUE;
res = GST_BASE_PARSE_CLASS (parent_class)->sink_event (parse, event);
break;