From f16a6fa764effb536ab28766fb686474577cc045 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Sat, 18 Dec 2004 22:53:29 +0000 Subject: [PATCH] gst/matroska/matroska-demux.c: That was very stupid. Original commit message from CVS: * gst/matroska/matroska-demux.c: (gst_matroska_ebmlnum_sint): That was very stupid. --- ChangeLog | 5 +++++ gst/matroska/matroska-demux.c | 6 ++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index b4d45b8..00fcfee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2004-12-18 Ronald S. Bultje + * gst/matroska/matroska-demux.c: (gst_matroska_ebmlnum_sint): + That was very stupid. + +2004-12-18 Ronald S. Bultje + * gst/matroska/matroska-demux.c: (gst_matroska_demux_parse_blockgroup): Fix possible crasher. diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c index e4353c4..23d099d 100644 --- a/gst/matroska/matroska-demux.c +++ b/gst/matroska/matroska-demux.c @@ -1732,12 +1732,10 @@ gst_matroska_ebmlnum_sint (guint8 * data, guint size, gint64 * num) return -1; /* make signed */ - if (unum == G_MAXUINT64 && res > 1) + if (unum == G_MAXUINT64) *num = G_MAXINT64; - else if (unum != 0) - *num = unum - ((1 << ((7 * res) - 1)) - 1); else - *num = 0; + *num = unum - ((1 << ((7 * res) - 1)) - 1); return res; } -- 2.7.4