From 319f81bc60054000adcaf7cc052aad7a3afb0cc2 Mon Sep 17 00:00:00 2001 From: dhilshad Date: Sat, 15 Feb 2020 22:20:18 +0530 Subject: [PATCH] sparsefile: fix possible crash when seeking In gst_sparse_file_clear function we were closing a file and reopening it using closed file descriptor. Fix: Removed closing and reopening of file. Fixes #512 Part-of: --- plugins/elements/gstsparsefile.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/plugins/elements/gstsparsefile.c b/plugins/elements/gstsparsefile.c index 0ff6b16..a88344a 100644 --- a/plugins/elements/gstsparsefile.c +++ b/plugins/elements/gstsparsefile.c @@ -191,10 +191,6 @@ gst_sparse_file_clear (GstSparseFile * file) { g_return_if_fail (file != NULL); - if (file->file) { - fclose (file->file); - file->file = fdopen (file->fd, "wb+"); - } g_slice_free_chain (GstSparseRange, file->ranges, next); file->current_pos = 0; file->ranges = NULL; -- 2.7.4