libs: videopool: fix undocumented behavior and counting
authorHe Junyan <junyan.he@hotmail.com>
Thu, 30 May 2019 15:52:51 +0000 (23:52 +0800)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Thu, 15 Aug 2019 16:08:24 +0000 (16:08 +0000)
commite96a435756b78f477bc29c465c62554f26bb8bc3
tree021408d859f6f1be670e500d3b131ec66b9591b4
parent5939bf4d81054f302fe9b14af491fed08e58dcb4
libs: videopool: fix undocumented behavior and counting

gst_vaapi_video_pool_reserve_unlocked() hit an undocumented behavoir
because it locks twice the same mutex.

Also, n had different meanings in the current code: as an increase
value and as a new total of allocated surfaces.

This patche removes the undocumented behavoir (usually a deadlock) and
fixes the meaning of n as the new total of allocated surfaces.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
gst-libs/gst/vaapi/gstvaapivideopool.c