avviddec: fix memory leak

Free config before overwriting.

CID #1320708
This commit is contained in:
Luis de Bethencourt 2015-08-28 15:15:39 +01:00 committed by Luis de Bethencourt
parent 2a2c9f8661
commit 074a128f0f

View file

@ -1889,6 +1889,7 @@ gst_ffmpegviddec_decide_allocation (GstVideoDecoder * decoder, GstQuery * query)
if (!working_pool) {
gst_object_unref (pool);
pool = gst_video_buffer_pool_new ();
gst_structure_free (config);
config = gst_buffer_pool_get_config (pool);
gst_buffer_pool_config_set_params (config, state->caps, size, min, max);
gst_buffer_pool_config_set_allocator (config, NULL, &params);