[Bug 725632] v4l2: Normalise control names in the same way as v4l2-ctl
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Tue Mar 4 05:25:16 PST 2014
https://bugzilla.gnome.org/show_bug.cgi?id=725632
GStreamer | gst-plugins-good | 1.2.3
--- Comment #4 from Will Manley <gnome at williammanley.net> 2014-03-04 13:47:37 UTC ---
(In reply to comment #2)
> Review of attachment 270862 [details]:
>
> I'm all in favour of doing that, small correction and we are good.
>
> ::: sys/v4l2/v4l2_calls.c
> @@ +328,1 @@
> control.name[31] = '\0';
>
> You can remove this one now, that was clearly a buf in previous code.
I'm not sure what you mean by "a buf" but I think it's safer to keep this line
in. The documentation to [VIDIOC_QUERYCTRL] says that name will be a NUL
terminated string so you're definitely not destroying any information here.
OTOH this line does make us more robust to badly behaved kernel drivers -
avoiding the for loop from accidentally overrunning it's buffers if the string
is not NUL terminated.
This is purely theoretical of course. I haven't seen any v4l2 drivers which
behave incorrectly in this way it just seemed safer to keep it. I can remove
it
if you like.
[VIDIOC_QUERYCTRL]:
http://linuxtv.org/downloads/v4l-dvb-apis/vidioc-queryctrl.html
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list