diff options
author | Duncan Palmer <dpalmer@digisoft.tv> | 2015-01-02 00:59:00 +0000 |
---|---|---|
committer | Thiago Santos <thiagoss@osg.samsung.com> | 2015-01-06 09:14:48 -0300 |
commit | ef71b6178ec56c0be9aac600d852f8d259f79760 (patch) | |
tree | 614256a6359c6f9eb734f869df550cf002576c11 | |
parent | 04e2a38ae3d8323a880a040fbcff5fd7e8ddda4c (diff) |
h264parse: Fix periodic SPS/PPS sending work after a seek
Reset the interval variable to have SPS/PPS sending work after
a (backwards) seek.
https://bugzilla.gnome.org/show_bug.cgi?id=742212
-rw-r--r-- | gst/videoparsers/gsth264parse.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c index db8e90966..91cf87930 100644 --- a/gst/videoparsers/gsth264parse.c +++ b/gst/videoparsers/gsth264parse.c @@ -1747,10 +1747,12 @@ gst_h264_parse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame) if (h264parse->interval > 0 || h264parse->push_codec) { GstClockTime timestamp = GST_BUFFER_TIMESTAMP (buffer); guint64 diff; + gboolean initial_frame = FALSE; /* init */ if (!GST_CLOCK_TIME_IS_VALID (h264parse->last_report)) { h264parse->last_report = timestamp; + initial_frame = TRUE; } if (h264parse->idr_pos >= 0) { @@ -1770,7 +1772,7 @@ gst_h264_parse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame) GST_TIME_ARGS (diff)); if (GST_TIME_AS_SECONDS (diff) >= h264parse->interval || - h264parse->push_codec) { + initial_frame || h264parse->push_codec) { GstBuffer *codec_nal; gint i; GstClockTime new_ts; @@ -2218,6 +2220,8 @@ gst_h264_parse_event (GstBaseParse * parse, GstEvent * event) || segment->applied_rate != 1.0)) h264parse->do_ts = FALSE; + h264parse->last_report = GST_CLOCK_TIME_NONE; + res = GST_BASE_PARSE_CLASS (parent_class)->sink_event (parse, event); break; } |