mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
vaav1dec: Remove double caps unref.
There was a duplicated caps unref raising a warning. Also it reorgs the sorrounding code for simplicity. Fixes: #1196 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3587>
This commit is contained in:
parent
068a5c1053
commit
171a626c6c
1 changed files with 3 additions and 5 deletions
|
@ -277,7 +277,7 @@ _create_internal_pool (GstVaAV1Dec * self, gint width, gint height)
|
||||||
gst_video_info_set_format (&info, self->preferred_format, width, height);
|
gst_video_info_set_format (&info, self->preferred_format, width, height);
|
||||||
|
|
||||||
caps = gst_video_info_to_caps (&info);
|
caps = gst_video_info_to_caps (&info);
|
||||||
if (caps == NULL) {
|
if (!caps) {
|
||||||
GST_WARNING_OBJECT (self, "Failed to create caps for internal pool");
|
GST_WARNING_OBJECT (self, "Failed to create caps for internal pool");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -291,17 +291,15 @@ _create_internal_pool (GstVaAV1Dec * self, gint width, gint height)
|
||||||
pool = gst_va_pool_new_with_config (caps, GST_VIDEO_INFO_SIZE (&info),
|
pool = gst_va_pool_new_with_config (caps, GST_VIDEO_INFO_SIZE (&info),
|
||||||
1, 0, VA_SURFACE_ATTRIB_USAGE_HINT_DECODER, GST_VA_FEATURE_AUTO,
|
1, 0, VA_SURFACE_ATTRIB_USAGE_HINT_DECODER, GST_VA_FEATURE_AUTO,
|
||||||
allocator, ¶ms);
|
allocator, ¶ms);
|
||||||
|
|
||||||
gst_clear_caps (&caps);
|
gst_clear_caps (&caps);
|
||||||
|
gst_object_unref (allocator);
|
||||||
|
|
||||||
if (!pool) {
|
if (!pool) {
|
||||||
GST_WARNING_OBJECT (self, "Failed to create internal pool");
|
GST_WARNING_OBJECT (self, "Failed to create internal pool");
|
||||||
gst_object_unref (allocator);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_object_unref (allocator);
|
|
||||||
gst_caps_unref (caps);
|
|
||||||
|
|
||||||
gst_buffer_pool_set_active (pool, TRUE);
|
gst_buffer_pool_set_active (pool, TRUE);
|
||||||
|
|
||||||
return pool;
|
return pool;
|
||||||
|
|
Loading…
Reference in a new issue