mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
h265parse: Set duration on buffers base on framerate
This commit is contained in:
parent
158d69fd45
commit
355719bae7
1 changed files with 9 additions and 3 deletions
|
@ -2288,9 +2288,15 @@ gst_h265_parse_parse_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
|
||||||
|
|
||||||
gst_h265_parse_update_src_caps (h265parse, NULL);
|
gst_h265_parse_update_src_caps (h265parse, NULL);
|
||||||
|
|
||||||
/* Fixme: Implement timestamp interpolation based on SEI Messagses */
|
if (h265parse->fps_num > 0 && h265parse->fps_den > 0) {
|
||||||
GST_FIXME_OBJECT (h265parse,
|
GstH265SPS *sps = h265parse->nalparser->last_sps;
|
||||||
"Implement timestamp/duration interpolation based on SEI message");
|
GstClockTime val;
|
||||||
|
|
||||||
|
val = (sps != NULL && sps->profile_tier_level.interlaced_source_flag) ?
|
||||||
|
GST_SECOND / 2 : GST_SECOND;
|
||||||
|
GST_BUFFER_DURATION (buffer) = gst_util_uint64_scale (val,
|
||||||
|
h265parse->fps_den, h265parse->fps_num);
|
||||||
|
}
|
||||||
|
|
||||||
if (h265parse->keyframe)
|
if (h265parse->keyframe)
|
||||||
GST_BUFFER_FLAG_UNSET (buffer, GST_BUFFER_FLAG_DELTA_UNIT);
|
GST_BUFFER_FLAG_UNSET (buffer, GST_BUFFER_FLAG_DELTA_UNIT);
|
||||||
|
|
Loading…
Reference in a new issue