mirror of
https://github.com/sony/flutter-elinux-plugins.git
synced 2025-08-14 01:00:52 +08:00
[video_player/camera] add gst_caps_unref (#91)
After using gst_pad_get_current_caps, it should be followed by a call to gst_caps_unref. Signed-off-by: Makoto Sato <makoto.sato@atmark-techno.com>
This commit is contained in:
@ -272,6 +272,7 @@ void GstCamera::HandoffHandler(GstElement* fakesink, GstBuffer* buf,
|
||||
int height;
|
||||
gst_structure_get_int(structure, "width", &width);
|
||||
gst_structure_get_int(structure, "height", &height);
|
||||
gst_caps_unref(caps);
|
||||
if (width != self->width_ || height != self->height_) {
|
||||
self->width_ = width;
|
||||
self->height_ = height;
|
||||
|
@ -403,6 +403,8 @@ void GstVideoPlayer::GetVideoSize(int32_t& width, int32_t& height) {
|
||||
return;
|
||||
}
|
||||
#endif // USE_EGL_IMAGE_DMABUF
|
||||
|
||||
gst_caps_unref(caps);
|
||||
}
|
||||
|
||||
// static
|
||||
@ -416,6 +418,7 @@ void GstVideoPlayer::HandoffHandler(GstElement* fakesink, GstBuffer* buf,
|
||||
int height;
|
||||
gst_structure_get_int(structure, "width", &width);
|
||||
gst_structure_get_int(structure, "height", &height);
|
||||
gst_caps_unref(caps);
|
||||
if (width != self->width_ || height != self->height_) {
|
||||
self->width_ = width;
|
||||
self->height_ = height;
|
||||
|
Reference in New Issue
Block a user