Commit b1130331 authored by Alessandro Decina's avatar Alessandro Decina
Browse files

encodebin: minor fix in error handling.

Don't call gst_bin_remove (bin, <invalid pointer>).
parent 9f6bcdd5
......@@ -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,7 +1400,8 @@ no_muxer_ghost_pad:
GST_WARNING ("Could not create Streams");
gst_bin_remove (GST_BIN (ebin), muxer);
if (muxer)
gst_bin_remove (GST_BIN (ebin), muxer);
ebin->muxer = NULL;
return FALSE;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment