GNOME Bugzilla – Bug 119550
useless comparison
Last modified: 2004-12-22 21:47:04 UTC
I don't know if this actually causes any breakage, but gstreamer/libs/gst/bytestream/bytestream.c, line 277 has if (GST_BUFFER_OFFSET (headbuf) != -1) Which, since GstBuffer->offset is declared unsigned, could be replaced by if(1). It doesn't look sensible
I think it's checking for validity of the offset. An invalid offset is marked as (guint64) -1. Don't know why it does is this way, though, this is broken indeed, it seems...
That is legacy code from the time when offset was byte specific. I've removed it. If there's any breakage in plugins because of this, we'll find out soon enough. Thanks for pointing this out. btw: In comparisons between signed and unsigned ints the signed is always casted to unsigned. So this comparison would compare to G_MAX_UINT or so.