void uninit_audio_out(struct MPContext *mpctx) { if (mpctx->ao) { // Note: with gapless_audio, stop_play is not correctly set if (mpctx->opts->gapless_audio || mpctx->stop_play == AT_END_OF_FILE) ao_drain(mpctx->ao); ao_uninit(mpctx->ao); } mpctx->ao = NULL; talloc_free(mpctx->ao_decoder_fmt); mpctx->ao_decoder_fmt = NULL; }
void uninit_audio_out(struct MPContext *mpctx) { if (mpctx->ao) { // Note: with gapless_audio, stop_play is not correctly set if (mpctx->opts->gapless_audio || mpctx->stop_play == AT_END_OF_FILE) ao_drain(mpctx->ao); ao_uninit(mpctx->ao); mp_notify(mpctx, MPV_EVENT_AUDIO_RECONFIG, NULL); } mpctx->ao = NULL; TA_FREEP(&mpctx->ao_filter_fmt); }