From 2969f0a29c84eadcf68fb1bc4ba255ebf47f42af Mon Sep 17 00:00:00 2001 From: by Mark Nauwelaerts Date: Tue, 5 Jun 2007 21:47:29 +0000 Subject: [PATCH] gst/dvdsub/gstdvdsubdec.c: Use GstClockTime instead of guint for a time variable to prevent overflows on too large su... Original commit message from CVS: Patch by by: Mark Nauwelaerts * gst/dvdsub/gstdvdsubdec.c: (gst_dvd_sub_dec_parse_subpic): Use GstClockTime instead of guint for a time variable to prevent overflows on too large subtitle durations. Fixes #444514. --- ChangeLog | 8 ++++++++ gst/dvdsub/gstdvdsubdec.c | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 90cea0693a..f470af14af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-06-05 Sebastian Dröge + + Patch by by: Mark Nauwelaerts + + * gst/dvdsub/gstdvdsubdec.c: (gst_dvd_sub_dec_parse_subpic): + Use GstClockTime instead of guint for a time variable to prevent + overflows on too large subtitle durations. Fixes #444514. + 2007-05-31 Tim-Philipp Müller Patch by: Mark Nauwelaerts diff --git a/gst/dvdsub/gstdvdsubdec.c b/gst/dvdsub/gstdvdsubdec.c index 0cb88164ab..26372542da 100644 --- a/gst/dvdsub/gstdvdsubdec.c +++ b/gst/dvdsub/gstdvdsubdec.c @@ -243,7 +243,7 @@ gst_dvd_sub_dec_parse_subpic (GstDvdSubDec * dec) gboolean broken = FALSE; gboolean last_seq = FALSE; guchar *next_seq = NULL; - guint event_time; + GstClockTime event_time; /* nothing to do if we finished this buffer already */ if (dec->parse_pos == NULL) @@ -368,7 +368,7 @@ gst_dvd_sub_dec_parse_subpic (GstDvdSubDec * dec) /* Start a new control sequence */ if (buf + 4 < end) { - gint ticks = GST_READ_UINT16_BE (buf); + guint16 ticks = GST_READ_UINT16_BE (buf); event_time = gst_util_uint64_scale (ticks, 1024 * GST_SECOND, 90000);