summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-01-18 13:31:06 +0100
committerSebastian Dröge <sebastian@centricular.com>2014-02-10 18:51:09 +0100
commitcd7a8c477cf0b4147bf47683a5764c74755e01a4 (patch)
tree0942b4cc14678a094ec5d6b7c45778568faa6e85
parent834aefe50ce6e5bc951478dc77498ba27703905f (diff)
downloadgstreamer-plugins-base-cd7a8c477cf0b4147bf47683a5764c74755e01a4.tar.gz
playbin: Insert decoders without GstAVElement information between the other decoders
Otherwise they would be preferred over all decoders independent of their ranks. https://bugzilla.gnome.org/show_bug.cgi?id=722316
-rw-r--r--gst/playback/gstplaybin2.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c
index 85239e9a0..dbf034292 100644
--- a/gst/playback/gstplaybin2.c
+++ b/gst/playback/gstplaybin2.c
@@ -3839,6 +3839,7 @@ create_decoders_list (GList * factory_list, GSequence * avelements)
{
GList *dec_list = NULL, *tmp;
GList *ave_list = NULL;
+ GList *ave_free_list = NULL;
GstAVElement *ave, *best_ave;
g_return_val_if_fail (factory_list != NULL, NULL);
@@ -3867,7 +3868,10 @@ create_decoders_list (GList * factory_list, GSequence * avelements)
/* There's at least raw */
ave->n_comm_cf = 1;
- dec_list = g_list_prepend (dec_list, factory);
+ ave_list = g_list_prepend (ave_list, ave);
+
+ /* We need to free these later */
+ ave_free_list = g_list_prepend (ave_free_list, ave);
continue;
}
@@ -3905,6 +3909,10 @@ create_decoders_list (GList * factory_list, GSequence * avelements)
}
g_list_free (ave_list);
+ for (tmp = ave_free_list; tmp; tmp = tmp->next)
+ g_slice_free (GstAVElement, tmp->data);
+ g_list_free (ave_free_list);
+
dec_list = g_list_reverse (dec_list);
return dec_list;