diff options
author | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2020-08-18 11:39:46 +0200 |
---|---|---|
committer | GStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2020-08-24 19:35:57 +0000 |
commit | c905f6131d48254424b106292c2d40c1ebac6ffe (patch) | |
tree | 5b0682b351adf72d9d6e951c2d37fd4d639c1ecd /sys | |
parent | f755730b2045686c8c70c457cebc49a21fa6044b (diff) | |
download | gstreamer-plugins-bad-c905f6131d48254424b106292c2d40c1ebac6ffe.tar.gz |
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>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/va/gstvah264dec.c | 12 | ||||
-rw-r--r-- | sys/va/gstvah264dec.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sys/va/gstvah264dec.c b/sys/va/gstvah264dec.c index ef9e16474..a3c13fa37 100644 --- a/sys/va/gstvah264dec.c +++ b/sys/va/gstvah264dec.c @@ -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); diff --git a/sys/va/gstvah264dec.h b/sys/va/gstvah264dec.h index 78f5ca777..c55fed074 100644 --- a/sys/va/gstvah264dec.h +++ b/sys/va/gstvah264dec.h @@ -20,8 +20,6 @@ #pragma once -#include <gst/codecs/gsth264decoder.h> - #include "gstvadevice.h" G_BEGIN_DECLS |