summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2011-03-27 17:42:56 +0100
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2011-03-27 17:42:56 +0100
commitf09f27a761d793db7903040eabb10b429260cea5 (patch)
treeecee77d55292568e0f0aa0f2d237844e489e5346 /sys
parentc10ef4df20519fa84242f6e5dabd60d2e94cb48e (diff)
downloadgstreamer-plugins-bad-f09f27a761d793db7903040eabb10b429260cea5.tar.gz
dshow: fix list iteration code
Diffstat (limited to 'sys')
-rw-r--r--sys/dshowsrcwrapper/gstdshow.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/dshowsrcwrapper/gstdshow.cpp b/sys/dshowsrcwrapper/gstdshow.cpp
index b2d577b71..11ea159d6 100644
--- a/sys/dshowsrcwrapper/gstdshow.cpp
+++ b/sys/dshowsrcwrapper/gstdshow.cpp
@@ -123,13 +123,10 @@ gst_dshow_new_pin_mediatype_from_streamcaps (IPin * pin, gint id, IAMStreamConfi
void
gst_dshow_free_pins_mediatypes (GList * pins_mediatypes)
{
- guint i = 0;
- for (; i < g_list_length (pins_mediatypes); i++) {
- GList *mylist = g_list_nth (pins_mediatypes, i);
- if (mylist && mylist->data)
- gst_dshow_free_pin_mediatype ((GstCapturePinMediaType *) mylist->data);
+ while (pins_mediatypes != NULL) {
+ gst_dshow_free_pin_mediatype (pins_mediatypes->data);
+ pins_mediatypes = g_list_remove_link (pins_mediatypes, pins_mediatypes);
}
- g_list_free (pins_mediatypes);
}
gboolean