diff options
author | Thiago Santos <thiagoss@embedded.ufcg.edu.br> | 2009-08-12 18:33:22 -0300 |
---|---|---|
committer | Thiago Santos <thiagoss@embedded.ufcg.edu.br> | 2009-08-12 19:17:37 -0300 |
commit | c83615fca957b2045087433fd5a2e13204253aa2 (patch) | |
tree | 55dc1edf991592df6471e69cd5906bc3282b63ca /gst/asfmux/gstasfmux.c | |
parent | 4f61f46f073a940b7fab47ae165b8816ff74770c (diff) | |
download | gst-plugins-bad-c83615fca957b2045087433fd5a2e13204253aa2.tar.gz gst-plugins-bad-c83615fca957b2045087433fd5a2e13204253aa2.tar.bz2 gst-plugins-bad-c83615fca957b2045087433fd5a2e13204253aa2.zip |
asfmux: Do not mess up GstCollectData list
asfmux was messing up with the GstCollectData list of its
GstCollectPads when sorting the list inplace. This patch makes
it copy the list before sorting it, leaving the GstCollectPads
list as is. Fixes #591610
Diffstat (limited to 'gst/asfmux/gstasfmux.c')
-rw-r--r-- | gst/asfmux/gstasfmux.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gst/asfmux/gstasfmux.c b/gst/asfmux/gstasfmux.c index 83f52701..7f17169f 100644 --- a/gst/asfmux/gstasfmux.c +++ b/gst/asfmux/gstasfmux.c @@ -1604,7 +1604,7 @@ gst_asf_mux_write_indexes (GstAsfMux * asfmux) /* write simple indexes for video medias */ ordered_pads = - g_slist_sort (asfmux->collect->data, + g_slist_sort (g_slist_copy (asfmux->collect->data), (GCompareFunc) stream_number_compare); for (walker = ordered_pads; walker; walker = g_slist_next (walker)) { GstAsfPad *pad = (GstAsfPad *) walker->data; @@ -1613,10 +1613,12 @@ gst_asf_mux_write_indexes (GstAsfMux * asfmux) if (ret != GST_FLOW_OK) { GST_ERROR_OBJECT (asfmux, "Failed to write simple index for stream %" G_GUINT16_FORMAT, (guint16) pad->stream_number); - return ret; + goto cleanup_and_return; } } } +cleanup_and_return: + g_slist_free (ordered_pads); return ret; } |