From 4ee738be590348912ae3af607711af8b4550ad3f Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Thu, 10 Mar 2011 14:38:47 -0300 Subject: [PATCH] encodebin: Tear down old profiles when setting new ones In NULL/READY, we should be able to switch profiles on encodebin, this patch makes it tear down old profiles when new ones are set if in NULL/READY states https://bugzilla.gnome.org/show_bug.cgi?id=644416 --- gst/encoding/gstencodebin.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gst/encoding/gstencodebin.c b/gst/encoding/gstencodebin.c index c1a0e8bbc0..51b93ce9a8 100644 --- a/gst/encoding/gstencodebin.c +++ b/gst/encoding/gstencodebin.c @@ -1698,9 +1698,9 @@ gst_encode_bin_set_profile (GstEncodeBin * ebin, GstEncodingProfile * profile) } /* If we're not active, we can deactivate the previous profile */ - if (ebin->profile) - gst_encoding_profile_unref (ebin->profile); - ebin->profile = NULL; + if (ebin->profile) { + gst_encode_bin_tear_down_profile (ebin); + } return gst_encode_bin_setup_profile (ebin, profile); }