mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +00:00
v4l2bufferpool: return TRUE when buffer pool orphaning succeeds
When trying to orphan a buffer pool, successfully return and unref the pool when the pool is either successfully stopped or orphaned. Indicate failure and leave the pool untouched otherwise.
This commit is contained in:
parent
f3970565f0
commit
1b9a0f1c2d
1 changed files with 6 additions and 1 deletions
|
@ -995,11 +995,16 @@ gst_v4l2_buffer_pool_orphan (GstBufferPool ** bpool)
|
|||
*/
|
||||
ret = gst_v4l2_buffer_pool_stop (*bpool);
|
||||
if (!ret)
|
||||
gst_v4l2_allocator_orphan (pool->vallocator);
|
||||
ret = gst_v4l2_allocator_orphan (pool->vallocator);
|
||||
|
||||
if (!ret)
|
||||
goto orphan_failed;
|
||||
|
||||
pool->orphaned = TRUE;
|
||||
gst_object_unref (*bpool);
|
||||
*bpool = NULL;
|
||||
|
||||
orphan_failed:
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue