From fbce8ebb2d042e41814d2bb7f545c542973342c5 Mon Sep 17 00:00:00 2001 From: Joey Golan Date: Tue, 27 Aug 2024 21:20:47 +0300 Subject: [PATCH] MT#55283 move output_close ... ... from meta_free to meta_destroy This change would ensure that the output media file is properly closed and the MP3 file is correctly formatted Closes #1853 Change-Id: I3dacea5257854b3cda19fa2fa38d6806b11d2783 --- recording-daemon/metafile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recording-daemon/metafile.c b/recording-daemon/metafile.c index 6c7d1ab62..1478f0d6a 100644 --- a/recording-daemon/metafile.c +++ b/recording-daemon/metafile.c @@ -26,7 +26,6 @@ static void meta_free(void *ptr) { metafile_t *mf = ptr; dbg("freeing metafile info for %s%s%s", FMT_M(mf->name)); - output_close(mf, mf->mix_out, NULL, mf->discard); mix_destroy(mf->mix); db_close_call(mf); g_string_chunk_free(mf->gsc); @@ -82,6 +81,8 @@ static void meta_destroy(metafile_t *mf) { mf->ssrc_hash = NULL; } db_close_call(mf); + output_close(mf, mf->mix_out, NULL, mf->discard); + mf->mix_out = NULL; }