projects
/
platform
/
upstream
/
gst-plugins-good.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e49cbdb
)
v4l2bufferpool: return TRUE when buffer pool orphaning succeeds
author
Damian Hobson-Garcia
<dhobsong@igel.co.jp>
Thu, 30 May 2019 02:13:07 +0000
(11:13 +0900)
committer
Tim-Philipp Müller
<tim@centricular.com>
Wed, 7 Aug 2019 22:57:48 +0000
(23:57 +0100)
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.
sys/v4l2/gstv4l2bufferpool.c
patch
|
blob
|
history
diff --git
a/sys/v4l2/gstv4l2bufferpool.c
b/sys/v4l2/gstv4l2bufferpool.c
index
282a02e
..
d7fa9fa
100644
(file)
--- a/
sys/v4l2/gstv4l2bufferpool.c
+++ b/
sys/v4l2/gstv4l2bufferpool.c
@@
-1003,11
+1003,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;
}