mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
encodebin: minor fix in error handling.
Don't call gst_bin_remove (bin, <invalid pointer>).
This commit is contained in:
parent
9f6bcdd5ee
commit
b11303319c
1 changed files with 3 additions and 2 deletions
|
@ -1320,7 +1320,7 @@ static gboolean
|
||||||
create_elements_and_pads (GstEncodeBin * ebin)
|
create_elements_and_pads (GstEncodeBin * ebin)
|
||||||
{
|
{
|
||||||
gboolean ret = TRUE;
|
gboolean ret = TRUE;
|
||||||
GstElement *muxer;
|
GstElement *muxer = NULL;
|
||||||
GstPad *muxerpad;
|
GstPad *muxerpad;
|
||||||
const GList *tmp, *profiles;
|
const GList *tmp, *profiles;
|
||||||
GstEncodingProfile *sprof;
|
GstEncodingProfile *sprof;
|
||||||
|
@ -1400,7 +1400,8 @@ no_muxer_ghost_pad:
|
||||||
stream_error:
|
stream_error:
|
||||||
{
|
{
|
||||||
GST_WARNING ("Could not create Streams");
|
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;
|
ebin->muxer = NULL;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue