basesrc: mind boggling wrap when comparing offsets

This commit is contained in:
Mark Nauwelaerts 2013-11-02 15:42:07 +01:00 committed by Sebastian Dröge
parent 07c88f32e4
commit 8d818eb981

View file

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