mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 00:06:36 +00:00
decklinkvideosrc: fix use-after-free in error code path
This commit is contained in:
parent
8d128f8bf5
commit
ddcc1c6442
1 changed files with 2 additions and 2 deletions
|
@ -567,10 +567,10 @@ gst_decklink_video_src_create (GstPushSrc * bsrc, GstBuffer ** buffer)
|
||||||
self->caps_mode = f->mode;
|
self->caps_mode = f->mode;
|
||||||
} else {
|
} else {
|
||||||
g_mutex_unlock (&self->lock);
|
g_mutex_unlock (&self->lock);
|
||||||
capture_frame_free (f);
|
|
||||||
GST_ELEMENT_ERROR (self, CORE, NEGOTIATION,
|
GST_ELEMENT_ERROR (self, CORE, NEGOTIATION,
|
||||||
("Invalid mode in captured frame"),
|
("Invalid mode in captured frame"),
|
||||||
("Mode set to %d but captured %d", self->caps_mode, f->mode));
|
("Mode set to %d but captured %d", self->caps_mode, f->mode));
|
||||||
|
capture_frame_free (f);
|
||||||
return GST_FLOW_NOT_NEGOTIATED;
|
return GST_FLOW_NOT_NEGOTIATED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -582,10 +582,10 @@ gst_decklink_video_src_create (GstPushSrc * bsrc, GstBuffer ** buffer)
|
||||||
self->caps_format = f->format;
|
self->caps_format = f->format;
|
||||||
} else {
|
} else {
|
||||||
g_mutex_unlock (&self->lock);
|
g_mutex_unlock (&self->lock);
|
||||||
capture_frame_free (f);
|
|
||||||
GST_ELEMENT_ERROR (self, CORE, NEGOTIATION,
|
GST_ELEMENT_ERROR (self, CORE, NEGOTIATION,
|
||||||
("Invalid pixel format in captured frame"),
|
("Invalid pixel format in captured frame"),
|
||||||
("Format set to %d but captured %d", self->caps_format, f->format));
|
("Format set to %d but captured %d", self->caps_format, f->format));
|
||||||
|
capture_frame_free (f);
|
||||||
return GST_FLOW_NOT_NEGOTIATED;
|
return GST_FLOW_NOT_NEGOTIATED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue