mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 12:32:29 +00:00
va: h264dec: check va allocator at decide allocation
And some code cleanups Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1516>
This commit is contained in:
parent
f755730b20
commit
c905f6131d
2 changed files with 7 additions and 7 deletions
|
@ -24,6 +24,8 @@
|
|||
|
||||
#include "gstvah264dec.h"
|
||||
|
||||
#include <gst/codecs/gsth264decoder.h>
|
||||
|
||||
#include <va/va_drmcommon.h>
|
||||
|
||||
#include "gstvaallocator.h"
|
||||
|
@ -1214,11 +1216,11 @@ gst_va_h264_dec_decide_allocation (GstVideoDecoder * decoder, GstQuery * query)
|
|||
|
||||
if (gst_query_get_n_allocation_params (query) > 0) {
|
||||
gst_query_parse_nth_allocation_param (query, 0, &allocator, &other_params);
|
||||
if (allocator && !self->has_videometa
|
||||
&& !GST_IS_VA_DMABUF_ALLOCATOR (allocator)) {
|
||||
if (allocator && !(GST_IS_VA_DMABUF_ALLOCATOR (allocator)
|
||||
|| GST_IS_VA_ALLOCATOR (allocator))) {
|
||||
/* save the allocator for the other pool */
|
||||
if ((other_allocator = allocator))
|
||||
allocator = NULL;
|
||||
other_allocator = allocator;
|
||||
allocator = NULL;
|
||||
}
|
||||
update_allocator = TRUE;
|
||||
} else {
|
||||
|
@ -1405,7 +1407,7 @@ gst_va_h264_dec_class_init (gpointer g_class, gpointer class_data)
|
|||
|
||||
gobject_class->dispose = gst_va_h264_dec_dispose;
|
||||
|
||||
element_class->set_context = gst_va_h264_dec_set_context;
|
||||
element_class->set_context = GST_DEBUG_FUNCPTR (gst_va_h264_dec_set_context);
|
||||
|
||||
decoder_class->open = GST_DEBUG_FUNCPTR (gst_va_h264_dec_open);
|
||||
decoder_class->close = GST_DEBUG_FUNCPTR (gst_va_h264_dec_close);
|
||||
|
|
|
@ -20,8 +20,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <gst/codecs/gsth264decoder.h>
|
||||
|
||||
#include "gstvadevice.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
|
Loading…
Reference in a new issue