mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
msdk: release resources if failing to create the buffer pool
Needn't check the pointers against NULL because the pointers are non-NULL
This commit is contained in:
parent
a301150002
commit
ba7f4de298
3 changed files with 10 additions and 6 deletions
|
@ -1112,11 +1112,14 @@ error_no_pool:
|
|||
error_no_allocator:
|
||||
{
|
||||
GST_INFO_OBJECT (thiz, "failed to create allocator");
|
||||
gst_object_unref (pool);
|
||||
return NULL;
|
||||
}
|
||||
error_pool_config:
|
||||
{
|
||||
GST_INFO_OBJECT (thiz, "failed to set config");
|
||||
gst_object_unref (pool);
|
||||
gst_object_unref (allocator);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -952,11 +952,14 @@ error_no_pool:
|
|||
error_no_allocator:
|
||||
{
|
||||
GST_INFO_OBJECT (thiz, "failed to create allocator");
|
||||
gst_object_unref (pool);
|
||||
return FALSE;
|
||||
}
|
||||
error_pool_config:
|
||||
{
|
||||
GST_INFO_OBJECT (thiz, "failed to set config");
|
||||
gst_object_unref (pool);
|
||||
gst_object_unref (allocator);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -304,21 +304,19 @@ error_no_pool:
|
|||
error_no_video_info:
|
||||
{
|
||||
GST_INFO_OBJECT (thiz, "Failed to get Video info from caps");
|
||||
gst_object_unref (pool);
|
||||
return NULL;
|
||||
}
|
||||
error_no_allocator:
|
||||
{
|
||||
GST_INFO_OBJECT (thiz, "Failed to create allocator");
|
||||
if (pool)
|
||||
gst_object_unref (pool);
|
||||
return NULL;
|
||||
}
|
||||
error_pool_config:
|
||||
{
|
||||
GST_INFO_OBJECT (thiz, "Failed to set config");
|
||||
if (pool)
|
||||
gst_object_unref (pool);
|
||||
if (allocator)
|
||||
gst_object_unref (allocator);
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue