mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
vaapivideomemory: code style fixes
A cosmetic commit for enhance readability of the casts and method preconditions.
This commit is contained in:
parent
85b3af62b4
commit
f6566a2c98
1 changed files with 6 additions and 4 deletions
|
@ -298,11 +298,12 @@ gst_video_meta_map_vaapi_memory (GstVideoMeta * meta, guint plane,
|
|||
GstAllocator *allocator;
|
||||
GstVaapiVideoMemory *const mem =
|
||||
GST_VAAPI_VIDEO_MEMORY_CAST (gst_buffer_peek_memory (meta->buffer, 0));
|
||||
|
||||
g_return_val_if_fail (mem, FALSE);
|
||||
g_return_val_if_fail (mem->meta, FALSE);
|
||||
|
||||
allocator = GST_MEMORY_CAST (mem)->allocator;
|
||||
g_return_val_if_fail (GST_VAAPI_IS_VIDEO_ALLOCATOR (allocator), FALSE);
|
||||
g_return_val_if_fail (mem->meta, FALSE);
|
||||
|
||||
g_mutex_lock (&mem->lock);
|
||||
if (mem->map_type && mem->map_type != GST_VAAPI_VIDEO_MEMORY_MAP_TYPE_PLANAR)
|
||||
|
@ -340,14 +341,15 @@ gst_video_meta_unmap_vaapi_memory (GstVideoMeta * meta, guint plane,
|
|||
GstAllocator *allocator;
|
||||
GstVaapiVideoMemory *const mem =
|
||||
GST_VAAPI_VIDEO_MEMORY_CAST (gst_buffer_peek_memory (meta->buffer, 0));
|
||||
g_return_val_if_fail (mem, FALSE);
|
||||
|
||||
allocator = GST_MEMORY_CAST (mem)->allocator;
|
||||
g_return_val_if_fail (GST_VAAPI_IS_VIDEO_ALLOCATOR (allocator), FALSE);
|
||||
g_return_val_if_fail (mem, FALSE);
|
||||
g_return_val_if_fail (mem->meta, FALSE);
|
||||
g_return_val_if_fail (mem->surface, FALSE);
|
||||
g_return_val_if_fail (mem->image, FALSE);
|
||||
|
||||
allocator = GST_MEMORY_CAST (mem)->allocator;
|
||||
g_return_val_if_fail (GST_VAAPI_IS_VIDEO_ALLOCATOR (allocator), FALSE);
|
||||
|
||||
g_mutex_lock (&mem->lock);
|
||||
if (--mem->map_count == 0) {
|
||||
mem->map_type = 0;
|
||||
|
|
Loading…
Reference in a new issue