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 584118 - [gstadapter][doc] Improve documentation of gst_adapter_masked_scan_uint32()
[gstadapter][doc] Improve documentation of gst_adapter_masked_scan_uint32()
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.10.24
Assigned To: Wim Taymans
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-05-28 12:48 UTC by Arnout Vandecappelle
Modified: 2009-05-28 20:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Improved documentation (2.05 KB, patch)
2009-05-28 13:18 UTC, Arnout Vandecappelle
committed Details | Review
Fix for the suspicious boundary case (3.04 KB, patch)
2009-05-28 13:19 UTC, Arnout Vandecappelle
committed Details | Review

Description Arnout Vandecappelle 2009-05-28 12:48:29 UTC
The attached patch adds an example to the documentation of gst_adapter_masked_scan_uint32().  I did this because I couldn't guess what would happen in boundary cases without looking at the source.

While making these examples, there is one boundary case that I would consider a bug.  It's indicated with an exclamation mark in the example.
Comment 1 Arnout Vandecappelle 2009-05-28 13:18:57 UTC
Created attachment 135494 [details] [review]
Improved documentation
Comment 2 Arnout Vandecappelle 2009-05-28 13:19:37 UTC
Created attachment 135495 [details] [review]
Fix for the suspicious boundary case
Comment 3 Wim Taymans 2009-05-28 20:06:50 UTC
Thanks! I changed the code a little to only recover from an (unlikely) incomplete state in the slow path.

commit c74c3bf1b3eed8315c4e7781658bfaa02c9ae3eb
Author: Arnout Vandecappelle <arnout@mind.be>
Date:   Thu May 28 22:02:21 2009 +0200

    adapter: fix _masked_scan_uint32() at boundaries
    
    gst_adapter_masked_scan_uint32 could return values smaller than offset
    if the first byte(s) of the mask are 0 and the pattern matches the
    beginning of the adapter.
    Added examples to documentation of gst_adapter_masked_scan_uint32().
    Also added some more masked boundary tests.
    Fixes #584118