diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2014-04-15 13:39:39 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2014-04-15 13:39:39 +0200 |
commit | 02e613b6e31c34f3995a4cf898239a28455632a1 (patch) | |
tree | 374f159823ee4a51602ee98f05e8fe8aaabe7631 | |
parent | 1266fd0046d740c9c4c1a2139005e7cd61b9c817 (diff) |
oggmux: Clear Ogg streams before initing them
They might've been inited before, in which case we leak
memory when initing them again without clearing.
-rw-r--r-- | ext/ogg/gstoggmux.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/ogg/gstoggmux.c b/ext/ogg/gstoggmux.c index 3b352e940..fb96d7e66 100644 --- a/ext/ogg/gstoggmux.c +++ b/ext/ogg/gstoggmux.c @@ -398,6 +398,7 @@ gst_ogg_pad_data_reset (GstOggMux * ogg_mux, GstOggPadData * oggpad) oggpad->map.queued = NULL; oggpad->next_granule = 0; oggpad->keyframe_granule = -1; + ogg_stream_clear (&oggpad->map.stream); ogg_stream_init (&oggpad->map.stream, oggpad->map.serialno); if (oggpad->pagebuffers) { @@ -2109,6 +2110,7 @@ gst_ogg_mux_init_collectpads (GstCollectPads * collect) while (walk) { GstOggPadData *oggpad = (GstOggPadData *) walk->data; + ogg_stream_clear (&oggpad->map.stream); ogg_stream_init (&oggpad->map.stream, oggpad->map.serialno); oggpad->packetno = 0; oggpad->pageno = 0; |