videodecoder: do not leak pool and allocator in error case

https://bugzilla.gnome.org/show_bug.cgi?id=736679
This commit is contained in:
Ognyan Tonchev 2014-09-15 16:23:57 +02:00 committed by Nicolas Dufresne
parent 3a7cdcdfc9
commit 787b3fa7ec

View file

@ -3253,6 +3253,10 @@ gst_video_decoder_decide_allocation_default (GstVideoDecoder * decoder,
return TRUE;
config_failed:
if (allocator)
gst_object_unref (allocator);
if (pool)
gst_object_unref (pool);
GST_ELEMENT_ERROR (decoder, RESOURCE, SETTINGS,
("Failed to configure the buffer pool"),
("Configuration is most likely invalid, please report this issue."));