After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 119550 - useless comparison
useless comparison
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.7.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-08-10 11:53 UTC by Anders Johansson
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Anders Johansson 2003-08-10 11:53:34 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
Comment 1 Ronald Bultje 2003-08-10 14:55:25 UTC
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...
Comment 2 Benjamin Otte (Company) 2003-08-14 07:37:31 UTC
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.