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 <manauw at skynet dot be>
* 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.
This commit is contained in:
by Mark Nauwelaerts 2007-06-05 21:47:29 +00:00 committed by Sebastian Dröge
parent 1aa6c129e3
commit 2969f0a29c
2 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,11 @@
2007-06-05 Sebastian Dröge <slomo@circular-chaos.org>
Patch by by: Mark Nauwelaerts <manauw at skynet dot be>
* 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 <tim at centricular dot net>
Patch by: Mark Nauwelaerts <manauw at skynet be>

View file

@ -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);