From e10af7c4091ef1efc78443364865311b8b80c434 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Sat, 2 Nov 2013 15:42:07 +0100 Subject: [PATCH] basesrc: mind boggling wrap when comparing offsets --- libs/gst/base/gstbasesrc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/gst/base/gstbasesrc.c b/libs/gst/base/gstbasesrc.c index 10f4b5b..10b5a35 100644 --- a/libs/gst/base/gstbasesrc.c +++ b/libs/gst/base/gstbasesrc.c @@ -2292,8 +2292,8 @@ gst_base_src_update_length (GstBaseSrc * src, guint64 offset, guint * length, /* check size if we have one */ if (maxsize != -1) { /* if we run past the end, check if the file became bigger and - * retry. */ - if (G_UNLIKELY (offset + *length >= maxsize || force)) { + * retry. Mind wrap when checking. */ + if (G_UNLIKELY (offset >= maxsize || offset + *length >= maxsize || force)) { /* see if length of the file changed */ if (bclass->get_size) if (!bclass->get_size (src, &size)) -- 2.7.4