fix for allocator API changes

This commit is contained in:
Wim Taymans 2012-07-09 16:26:17 +02:00
parent 31a5359fb7
commit 0dd87d7eb7
2 changed files with 7 additions and 7 deletions

View file

@ -811,7 +811,7 @@ gst_video_decoder_finalize (GObject * object)
}
if (decoder->priv->allocator) {
gst_allocator_unref (decoder->priv->allocator);
gst_object_unref (decoder->priv->allocator);
decoder->priv->allocator = NULL;
}
@ -2666,7 +2666,7 @@ gst_video_decoder_decide_allocation_default (GstVideoDecoder * decoder,
else
gst_query_add_allocation_param (query, allocator, &params);
if (allocator)
gst_allocator_unref (allocator);
gst_object_unref (allocator);
if (update_pool)
gst_query_set_nth_allocation_pool (query, 0, pool, size, min, max);
@ -2757,13 +2757,13 @@ gst_video_decoder_set_src_caps (GstVideoDecoder * decoder)
gst_query_parse_nth_allocation_pool (query, 0, &pool, NULL, NULL, NULL);
if (!pool) {
if (allocator)
gst_allocator_unref (allocator);
gst_object_unref (allocator);
ret = FALSE;
goto no_decide_allocation;
}
if (decoder->priv->allocator)
gst_allocator_unref (decoder->priv->allocator);
gst_object_unref (decoder->priv->allocator);
decoder->priv->allocator = allocator;
decoder->priv->params = params;

View file

@ -204,9 +204,9 @@ video_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
priv->params = params;
if (priv->allocator)
gst_allocator_unref (priv->allocator);
gst_object_unref (priv->allocator);
if ((priv->allocator = allocator))
gst_allocator_ref (allocator);
gst_object_ref (allocator);
/* enable metadata based on config of the pool */
priv->add_videometa =
@ -334,7 +334,7 @@ gst_video_buffer_pool_finalize (GObject * object)
gst_caps_unref (priv->caps);
if (priv->allocator)
gst_allocator_unref (priv->allocator);
gst_object_unref (priv->allocator);
G_OBJECT_CLASS (gst_video_buffer_pool_parent_class)->finalize (object);
}