encodebin: minor fix in error handling.

Don't call gst_bin_remove (bin, <invalid pointer>).
This commit is contained in:
Alessandro Decina 2010-12-22 13:56:12 +01:00
parent 9f6bcdd5ee
commit b11303319c

View file

@ -1320,7 +1320,7 @@ static gboolean
create_elements_and_pads (GstEncodeBin * ebin)
{
gboolean ret = TRUE;
GstElement *muxer;
GstElement *muxer = NULL;
GstPad *muxerpad;
const GList *tmp, *profiles;
GstEncodingProfile *sprof;
@ -1400,6 +1400,7 @@ no_muxer_ghost_pad:
stream_error:
{
GST_WARNING ("Could not create Streams");
if (muxer)
gst_bin_remove (GST_BIN (ebin), muxer);
ebin->muxer = NULL;
return FALSE;