summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2019-08-14 22:08:34 +1000
committerTim-Philipp Müller <tim@centricular.com>2019-08-20 11:21:50 +0100
commit92eaeb5fb6781b9a643b3bd418300ccbd263c1d7 (patch)
tree9cc219b830f0655404cb3ec901fea62feb79c783
parented743952188a86293051c354704f178073226399 (diff)
downloadgstreamer-plugins-bad-92eaeb5fb6781b9a643b3bd418300ccbd263c1d7.tar.gz
h264parse: don't critical on VUI parameters > 2^31
A guint32 greater than 2^31 would be interpreted as negative by gst_util_uint64_scale_int() and critical. Use the 64-bit integer version of the function instead.
-rw-r--r--gst/videoparsers/gsth264parse.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c
index 41a31eafa..f4d82e55d 100644
--- a/gst/videoparsers/gsth264parse.c
+++ b/gst/videoparsers/gsth264parse.c
@@ -2224,14 +2224,14 @@ gst_h264_parse_get_timestamp (GstH264Parse * h264parse,
/* If upstream timestamp is valid, we respect it and adjust current
* reference point */
h264parse->ts_trn_nb = upstream -
- (GstClockTime) gst_util_uint64_scale_int
+ (GstClockTime) gst_util_uint64_scale
(h264parse->sei_cpb_removal_delay * GST_SECOND,
sps->vui_parameters.num_units_in_tick,
sps->vui_parameters.time_scale);
} else {
/* If no upstream timestamp is given, we write in new timestamp */
upstream = h264parse->dts = h264parse->ts_trn_nb +
- (GstClockTime) gst_util_uint64_scale_int
+ (GstClockTime) gst_util_uint64_scale
(h264parse->sei_cpb_removal_delay * GST_SECOND,
sps->vui_parameters.num_units_in_tick,
sps->vui_parameters.time_scale);
@@ -2242,7 +2242,7 @@ gst_h264_parse_get_timestamp (GstH264Parse * h264parse,
GST_LOG_OBJECT (h264parse, "duration based ts");
/* naive method: no removal delay specified
* track upstream timestamp and provide best guess frame duration */
- dur = gst_util_uint64_scale_int (duration * GST_SECOND,
+ dur = gst_util_uint64_scale (duration * GST_SECOND,
sps->vui_parameters.num_units_in_tick, sps->vui_parameters.time_scale);
/* sanity check */
if (dur < GST_MSECOND) {