gstreamer: Be pedantic on srcpads access
Use the std::vector::back() instead of [0] index which corresponds to std::vector::push_back() for tracking of pads. This doesn't introduce a functional change as the gst_libcamera_src_init() will only add one pad but it helps with readability. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
9eb8211160
commit
62e32042ae
1 changed files with 1 additions and 1 deletions
|
@ -746,7 +746,7 @@ gst_libcamera_src_init(GstLibcameraSrc *self)
|
||||||
gst_task_set_lock(self->task, &self->stream_lock);
|
gst_task_set_lock(self->task, &self->stream_lock);
|
||||||
|
|
||||||
state->srcpads_.push_back(gst_pad_new_from_template(templ, "src"));
|
state->srcpads_.push_back(gst_pad_new_from_template(templ, "src"));
|
||||||
gst_element_add_pad(GST_ELEMENT(self), state->srcpads_[0]);
|
gst_element_add_pad(GST_ELEMENT(self), state->srcpads_.back());
|
||||||
|
|
||||||
/* C-style friend. */
|
/* C-style friend. */
|
||||||
state->src_ = self;
|
state->src_ = self;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue