Index: content/common/gpu/media/vaapi_video_decode_accelerator.cc |
diff --git a/content/common/gpu/media/vaapi_video_decode_accelerator.cc b/content/common/gpu/media/vaapi_video_decode_accelerator.cc |
index 271a0f7a1c9b987d3134e5c039546f34fe980cfc..a430438d3ca93eb72c777073f839e053ee8f5f26 100644 |
--- a/content/common/gpu/media/vaapi_video_decode_accelerator.cc |
+++ b/content/common/gpu/media/vaapi_video_decode_accelerator.cc |
@@ -673,6 +673,12 @@ void VaapiVideoDecodeAccelerator::Decode( |
TRACE_EVENT1("Video Decoder", "VAVDA::Decode", "Buffer id", |
bitstream_buffer.id()); |
+ RETURN_AND_NOTIFY_ON_FAILURE( |
+ bitstream_buffer.id() >= 0 && |
+ base::SharedMemory::IsHandleValid(bitstream_buffer.handle()), |
+ "Invalid bitstream_buffer, id: " << bitstream_buffer.id(), |
+ INVALID_ARGUMENT, ); |
+ |
// We got a new input buffer from the client, map it and queue for later use. |
MapAndQueueNewInputBuffer(bitstream_buffer); |