GNOME Bugzilla – Bug 584118
[gstadapter][doc] Improve documentation of gst_adapter_masked_scan_uint32()
Last modified: 2009-05-28 20:06:50 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.
Created attachment 135494 [details] [review] Improved documentation
Created attachment 135495 [details] [review] Fix for the suspicious boundary case
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