summaryrefslogtreecommitdiff
path: root/omx/gstomxvideodec.c
diff options
context:
space:
mode:
Diffstat (limited to 'omx/gstomxvideodec.c')
-rw-r--r--omx/gstomxvideodec.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
index 335d17c..27f3b3b 100644
--- a/omx/gstomxvideodec.c
+++ b/omx/gstomxvideodec.c
@@ -561,8 +561,16 @@ gst_omx_video_dec_allocate_output_buffers (GstOMXVideoDec * self)
GstAllocator *allocator;
config = gst_buffer_pool_get_config (pool);
- gst_buffer_pool_config_get_params (config, &caps, NULL, &min, &max);
- gst_buffer_pool_config_get_allocator (config, &allocator, NULL);
+ if (!gst_buffer_pool_config_get_params (config, &caps, NULL, &min, &max)) {
+ GST_ERROR_OBJECT (self, "Can't get buffer pool params");
+ err = OMX_ErrorUndefined;
+ goto done;
+ }
+ if (!gst_buffer_pool_config_get_allocator (config, &allocator, NULL)) {
+ GST_ERROR_OBJECT (self, "Can't get buffer pool allocator");
+ err = OMX_ErrorUndefined;
+ goto done;
+ }
/* Need at least 2 buffers for anything meaningful */
min = MAX (MAX (min, port->port_def.nBufferCountMin), 4);