Commit 26c5d2f2 authored by conrad's avatar conrad

Mozilla 498380: free oggz->packet_buffer on close

Patch by Matthew Gregan
parent 40764352
......@@ -215,7 +215,7 @@ oggz_close (OGGZ * oggz)
oggz_vector_foreach (oggz->streams, oggz_stream_clear);
oggz_vector_delete (oggz->streams);
assert(oggz_dlist_is_empty(oggz->packet_buffer));
oggz_dlist_deliter(oggz->packet_buffer, oggz_read_free_pbuffers);
oggz_dlist_delete(oggz->packet_buffer);
if (oggz->metric_internal)
......
......@@ -319,4 +319,7 @@ int oggz_io_seek (OGGZ * oggz, long offset, int whence);
long oggz_io_tell (OGGZ * oggz);
int oggz_io_flush (OGGZ * oggz);
/* oggz_read */
OggzDListIterResponse oggz_read_free_pbuffers(void *elem);
#endif /* __OGGZ_PRIVATE_H__ */
......@@ -249,6 +249,16 @@ oggz_read_free_pbuffer_entry(OggzBufferedPacket *p) {
}
OggzDListIterResponse
oggz_read_free_pbuffers(void *elem)
{
OggzBufferedPacket *p = (OggzBufferedPacket *)elem;
oggz_read_free_pbuffer_entry(p);
return DLIST_ITER_CONTINUE;
}
OggzDListIterResponse
oggz_read_update_gp(void *elem) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment