0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 03:52:22 +02:00

Fix compilation

Broken by unchecked cherry-picking of 53867aa.
This commit is contained in:
Diogo Franco (Kovensky) 2015-02-25 11:16:18 +09:00
parent 7a02593dc4
commit 423d47130a

View File

@ -650,8 +650,11 @@ bool mp_remove_track(struct MPContext *mpctx, struct track *track)
for (int n = mpctx->num_tracks - 1; n >= 0 && !in_use; n--)
in_use |= mpctx->tracks[n]->demuxer == d;
if (!in_use)
free_demuxer_and_stream(d);
if (!in_use) {
struct stream *s = d->stream;
free_demuxer(d);
free_stream(s);
}
mp_notify(mpctx, MPV_EVENT_TRACKS_CHANGED, NULL);