diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c index a4c7fc1d94..a39bff99f0 100644 --- a/gst/videoparsers/gsth264parse.c +++ b/gst/videoparsers/gsth264parse.c @@ -457,7 +457,7 @@ gst_h264_parse_wrap_nal (GstH264Parse * h264parse, guint format, guint8 * data, || format == GST_H264_PARSE_FORMAT_AVC3) { tmp = GUINT32_TO_BE (size << (32 - 8 * nl)); } else { - /* HACK: nl should always be 4 here, otherwise this won't work. + /* HACK: nl should always be 4 here, otherwise this won't work. * There are legit cases where nl in avc stream is 2, but byte-stream * SC is still always 4 bytes. */ nl = 4; @@ -2444,7 +2444,7 @@ gst_h264_parse_parse_frame (GstBaseParse * parse, GstBaseParseFrame * frame) * particularly since our ts not that good they handle seeking etc */ if (h264parse->do_ts) gst_h264_parse_get_timestamp (h264parse, - &GST_BUFFER_TIMESTAMP (buffer), &GST_BUFFER_DURATION (buffer), + &GST_BUFFER_DTS (buffer), &GST_BUFFER_DURATION (buffer), h264parse->frame_start); if (h264parse->keyframe) diff --git a/tests/check/elements/h264parse.c b/tests/check/elements/h264parse.c index 543995bac8..90d8b4e224 100644 --- a/tests/check/elements/h264parse.c +++ b/tests/check/elements/h264parse.c @@ -271,6 +271,14 @@ verify_buffer_bs_au (buffer_verify_data_s * vdata, GstBuffer * buffer) fail_unless (ctx_sink_template == &sinktemplate_bs_au); + /* Currently the parser can only predict DTS when dealing with raw data. + * Ensure that this behavior is being checked here. */ + GST_DEBUG ("PTS: %" GST_TIME_FORMAT " DTS: %" GST_TIME_FORMAT, + GST_TIME_ARGS (GST_BUFFER_PTS (buffer)), + GST_TIME_ARGS (GST_BUFFER_DTS (buffer))); + fail_if (GST_BUFFER_PTS_IS_VALID (buffer)); + fail_unless (GST_BUFFER_DTS_IS_VALID (buffer)); + gst_buffer_map (buffer, &map, GST_MAP_READ); fail_unless (map.size > 4);