From b79b99edf664a60bab4865e106961ca28d79f0d1 Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Tue, 26 May 2026 18:43:55 +0200 Subject: [PATCH] MT#61856 media_player: clean partially initialized AV resources In case when adding blob id, we allocate a list of things, like: `AVFormatContext`, `AVIO` buffer, `AVIOContext`, and we manage to copy it before returning an error. On immediate failure this leaves the player in a partially initialized state, just be explicit and use the `media_player_coder_shutdown()` before to return an error. Change-Id: I9620e7b78f02e22d77f01bac3af6afc9dd5773fb --- daemon/media_player.c | 1 + 1 file changed, 1 insertion(+) diff --git a/daemon/media_player.c b/daemon/media_player.c index 274347184..7bc45b070 100644 --- a/daemon/media_player.c +++ b/daemon/media_player.c @@ -1862,6 +1862,7 @@ err: ilog(LOG_ERR, "Failed to start media playback from memory: %s", err); if (av_ret) ilog(LOG_ERR, "Error returned from libav: %s", av_error(av_ret)); + media_player_coder_shutdown(&mp->coder); return MPC_ERR; }