summaryrefslogtreecommitdiff
path: root/gst/encoding
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2011-04-16 09:12:31 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2011-04-16 09:12:31 +0200
commit352edd1dd954eba6ffd71c81bd04aad8c93fb426 (patch)
treea3a064dac0ee0a13a34deca2049e55d227c8ccb9 /gst/encoding
parent6e160bed3debba38efdcf433efc5ecc74d840321 (diff)
parent86f679aaac87087cacd4db67ecb9bd8b2a999c0e (diff)
Merge branch 'master' into 0.11
Diffstat (limited to 'gst/encoding')
-rw-r--r--gst/encoding/gstencodebin.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gst/encoding/gstencodebin.c b/gst/encoding/gstencodebin.c
index 1380fe2e0..7b0f1b482 100644
--- a/gst/encoding/gstencodebin.c
+++ b/gst/encoding/gstencodebin.c
@@ -1559,6 +1559,7 @@ stream_group_free (GstEncodeBin * ebin, StreamGroup * sgroup)
/* Capsfilter - outqueue */
gst_element_set_state (sgroup->outfilter, GST_STATE_NULL);
gst_element_unlink (sgroup->outfilter, sgroup->outqueue);
+ gst_element_set_state (sgroup->outqueue, GST_STATE_NULL);
gst_bin_remove (GST_BIN (ebin), sgroup->outqueue);
/* streamcombiner - parser - capsfilter */
@@ -1566,6 +1567,7 @@ stream_group_free (GstEncodeBin * ebin, StreamGroup * sgroup)
gst_element_set_state (sgroup->parser, GST_STATE_NULL);
gst_element_unlink (sgroup->parser, sgroup->outfilter);
gst_element_unlink (sgroup->combiner, sgroup->parser);
+ gst_bin_remove ((GstBin *) ebin, sgroup->parser);
}
/* Sink Ghostpad */
@@ -1606,6 +1608,8 @@ stream_group_free (GstEncodeBin * ebin, StreamGroup * sgroup)
gst_iterator_resync (it);
}
gst_iterator_free (it);
+ gst_element_set_state (sgroup->combiner, GST_STATE_NULL);
+ gst_bin_remove ((GstBin *) ebin, sgroup->combiner);
}
if (sgroup->splitter) {
@@ -1616,15 +1620,23 @@ stream_group_free (GstEncodeBin * ebin, StreamGroup * sgroup)
gst_iterator_resync (it);
}
gst_iterator_free (it);
+
+ gst_element_set_state (sgroup->splitter, GST_STATE_NULL);
+ gst_bin_remove ((GstBin *) ebin, sgroup->splitter);
}
if (sgroup->inqueue)
gst_bin_remove ((GstBin *) ebin, sgroup->inqueue);
+
if (sgroup->encoder)
gst_bin_remove ((GstBin *) ebin, sgroup->encoder);
+
if (sgroup->smartencoder)
gst_bin_remove ((GstBin *) ebin, sgroup->smartencoder);
+ if (sgroup->outfilter)
+ gst_bin_remove ((GstBin *) ebin, sgroup->outfilter);
+
g_slice_free (StreamGroup, sgroup);
}
@@ -1653,6 +1665,7 @@ gst_encode_bin_tear_down_profile (GstEncodeBin * ebin)
/* Remove muxer if present */
if (ebin->muxer) {
+ gst_element_set_state (ebin->muxer, GST_STATE_NULL);
gst_bin_remove (GST_BIN (ebin), ebin->muxer);
ebin->muxer = NULL;
}