media/gpu/v4l2vda: support destroying before Initialize() is called
Methods called in DestroyTask() assume that the input and output queues have been acquired. However this is only true if Initialize() has been successfully invoked, which only happens if a V4L2 codec device has been found. Consequently, the V4L2VDA crashes on every non-V4L2 platform. Fix this by explicitly checking that the queues have been acquired in the relevant methods. Also add a few DCHECK() that check our assumptions about the presence of input and output queues to make the code sturdier. BUG=890952 TEST=Checked that VDA unittest was passing on Eve and Hana. Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: Ibfa39a85486330c4daa1c0d16c0051796c0011c2 Reviewed-on: https://chromium-review.googlesource.com/1256387 Commit-Queue: Alexandre Courbot <acourbot@chromium.org> Reviewed-by:Pawel Osciak <posciak@chromium.org> Cr-Commit-Position: refs/heads/master@{#595723}
Showing
Please register or sign in to comment