mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 18:50:48 +00:00
dshow: fix list iteration code
This commit is contained in:
parent
c10ef4df20
commit
f09f27a761
1 changed files with 3 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue