mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
v4l2bufferpool: check that allocator is non null when stopping pool
Otherwise, we could dereference NULL allocator when the stop method is called by the GstBufferPool's finalize method. https://bugzilla.gnome.org/show_bug.cgi?id=738102
This commit is contained in:
parent
cc709d06de
commit
7ed27c264c
1 changed files with 3 additions and 2 deletions
|
@ -799,6 +799,7 @@ gst_v4l2_buffer_pool_stop (GstBufferPool * bpool)
|
|||
if (!gst_v4l2_buffer_pool_streamoff (pool))
|
||||
goto streamoff_failed;
|
||||
|
||||
if (pool->vallocator)
|
||||
gst_v4l2_allocator_flush (pool->vallocator);
|
||||
|
||||
for (i = 0; i < VIDEO_MAX_FRAME; i++) {
|
||||
|
@ -818,7 +819,7 @@ gst_v4l2_buffer_pool_stop (GstBufferPool * bpool)
|
|||
|
||||
ret = GST_BUFFER_POOL_CLASS (parent_class)->stop (bpool);
|
||||
|
||||
if (ret) {
|
||||
if (ret && pool->vallocator) {
|
||||
GstV4l2Return vret;
|
||||
|
||||
vret = gst_v4l2_allocator_stop (pool->vallocator);
|
||||
|
|
Loading…
Reference in a new issue