After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 658450 - mpegvideoparse: make this build with older glib
mpegvideoparse: make this build with older glib
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other All
: Normal normal
: 0.10.23
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-09-07 11:33 UTC by Vincent Penquerc'h
Modified: 2011-09-07 12:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
mpegvideoparse: make this build with older glib (1.29 KB, patch)
2011-09-07 11:33 UTC, Vincent Penquerc'h
needs-work Details | Review
mpegvideoparse: make this build with older glib (975 bytes, patch)
2011-09-07 12:31 UTC, Vincent Penquerc'h
committed Details | Review

Description Vincent Penquerc'h 2011-09-07 11:33:48 UTC
g_list_free_full is a new convenience function.
Replace it with g_list_foreach and g_list_free.
Comment 1 Vincent Penquerc'h 2011-09-07 11:33:50 UTC
Created attachment 195854 [details] [review]
mpegvideoparse: make this build with older glib
Comment 2 Sebastian Dröge (slomo) 2011-09-07 11:59:55 UTC
Review of attachment 195854 [details] [review]:

::: gst/videoparsers/gstmpegvideoparse.c
@@ +504,3 @@
   }
 
+  g_list_foreach (mpvparse->typeoffsize, (GFunc) gst_mpegv_parse_free, NULL);

Just pass g_free() here instead of a new function
Comment 3 Vincent Penquerc'h 2011-09-07 12:20:23 UTC
g_free takes one argument, GDestroy two.
While I think it actually would work given that the data pointer is the first argument, it may be confusing.
If knowing this, you confirm you prefer passing g_free directly I'll change it.
Comment 4 Sebastian Dröge (slomo) 2011-09-07 12:23:25 UTC
Yes please pass g_free(), that's quite normal practice and is guaranteed to work because in C the caller is responsible for cleaning up the parameters after the call returned.
Comment 5 Vincent Penquerc'h 2011-09-07 12:31:43 UTC
Created attachment 195864 [details] [review]
mpegvideoparse: make this build with older glib

g_list_free_full is a new convenience function.
Replace it with g_list_foreach and g_list_free.
Comment 6 Sebastian Dröge (slomo) 2011-09-07 12:35:24 UTC
commit 1a6dbe1e273dff4e5a6e9e9c7936589ce62a7eca
Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Date:   Wed Sep 7 12:32:48 2011 +0100

    mpegvideoparse: make this build with older glib
    
    g_list_free_full is a new convenience function.
    Replace it with g_list_foreach and g_list_free.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=658450