diff --git a/common b/common index c804988a15..733fca9137 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit c804988a15bf68d5661a7af7799a51140d03c425 +Subproject commit 733fca913736edad29dea6a8dded921282ecee20 diff --git a/gst/ffmpegcolorspace/gstffmpegcolorspace.c b/gst/ffmpegcolorspace/gstffmpegcolorspace.c index 344693b844..f278758ba6 100644 --- a/gst/ffmpegcolorspace/gstffmpegcolorspace.c +++ b/gst/ffmpegcolorspace/gstffmpegcolorspace.c @@ -128,7 +128,6 @@ gst_ffmpegcsp_transform_caps (GstBaseTransform * btrans, GstCaps *template; GstCaps *tmp, *tmp2; GstCaps *result; - guint i, n; GstStructure *s; GstCaps *alpha, *non_alpha; @@ -143,18 +142,14 @@ gst_ffmpegcsp_transform_caps (GstBaseTransform * btrans, /* Now move alpha formats to the beginning if caps is an alpha format * or at the end if caps is no alpha format */ - n = gst_caps_get_size (tmp); - alpha = gst_caps_new_empty (); non_alpha = gst_caps_new_empty (); - for (i = 0; i < n; i++) { - s = gst_caps_get_structure (tmp, i); - + while ((s = gst_caps_steal_structure (tmp, 0))) { if (gst_ffmpegcsp_structure_is_alpha (s)) - gst_caps_append_structure (alpha, gst_structure_copy (s)); + gst_caps_append_structure (alpha, s); else - gst_caps_append_structure (non_alpha, gst_structure_copy (s)); + gst_caps_append_structure (non_alpha, s); } s = gst_caps_get_structure (caps, 0);