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
mr26.1
Donat Zenichev 3 weeks ago
parent ceb7996cca
commit b79b99edf6

@ -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;
}

Loading…
Cancel
Save