From e19d557f1186c2ee8851ff5c4651fea70d1a34ce Mon Sep 17 00:00:00 2001 From: Claudio Matsuoka Date: Tue, 14 Feb 2012 10:07:31 -0200 Subject: [PATCH] [xmp] Flush buffer on normal exit Signed-off-by: Claudio Matsuoka --- src/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 2b04bed..d37b864 100644 --- a/src/main.c +++ b/src/main.c @@ -167,11 +167,14 @@ int main(int argc, char **argv) optind -= optind > first ? 2 : 1; skipprev = 1; } else if (control.skip == -2) { - break; + goto end; } control.skip = 0; } + sound->flush(); + +end: xmp_free_context(ctx); reset_tty(); sound->deinit();