[Bug 751071] applemedia: CMBlockBuffer can be non-contiguous
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Mon Jun 22 05:20:09 PDT 2015
https://bugzilla.gnome.org/show_bug.cgi?id=751071
--- Comment #3 from Ilya Konstantinov <ilya.konstantinov at gmail.com> ---
(In reply to Sebastian Dröge (slomo) from comment #2)
> ::: sys/applemedia/coremediabuffer.c
> @@ +159,3 @@
> + status =
> + CMBlockBufferGetDataPointer (block_buf, offset, &length_at_offset,
> + &total_length, &data);
>
> total_length is always containing the total length from the beginning of the
> block_buf? I.e. it will always return the same value here in this loop?
Yes, it's a funny API.
"The caller can compare (offset+lengthAtOffset) with totalLength to determine
whether the entire CMBlockBuffer has been referenced and whether it is possible
to access the CMBlockBuffer's data with a contiguous reference."
> @@ +171,3 @@
> + break;
> + offset += length_at_offset;
> + } while (TRUE);
>
> Why not "while (offset < total_length)"?
You're right, what you propose is nicer.
--
You are receiving this mail because:
You are the QA Contact for the bug.
More information about the gstreamer-bugs
mailing list