videomixer: Maintain z-order when new pad are added

https://bugzilla.gnome.org/show_bug.cgi?id=701109
This commit is contained in:
Nicolas Dufresne 2013-05-27 22:43:25 -04:00
parent 5532989728
commit cd30a81ee3

View file

@ -1874,7 +1874,8 @@ gst_videomixer2_request_new_pad (GstElement * element,
mixcol->end_time = -1;
/* Keep an internal list of mixpads for zordering */
mix->sinkpads = g_slist_append (mix->sinkpads, mixpad);
mix->sinkpads = g_slist_insert_sorted (mix->sinkpads, mixpad,
(GCompareFunc) pad_zorder_compare);
mix->numpads++;
GST_VIDEO_MIXER2_UNLOCK (mix);
} else {