summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-06-22 14:59:51 +0200
committerwm4 <wm4@nowhere>2015-06-22 16:03:03 +0200
commit17e8815e3769c4c6940828b00815df3fe663d9e0 (patch)
tree2773363bd9510be190e5fe9c56665920365f7094
parent872b19dfcb56a19fcfed13509cef833db07653f6 (diff)
downloadmpv-17e8815e3769c4c6940828b00815df3fe663d9e0.tar.bz2
mpv-17e8815e3769c4c6940828b00815df3fe663d9e0.tar.xz
af_lavrresample: don't flush in uninitialized state
libswresample verbosely complains.
-rw-r--r--audio/filter/af_lavrresample.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/audio/filter/af_lavrresample.c b/audio/filter/af_lavrresample.c
index 265fa4b27e..7c2d7315e2 100644
--- a/audio/filter/af_lavrresample.c
+++ b/audio/filter/af_lavrresample.c
@@ -391,7 +391,8 @@ static int control(struct af_instance *af, int cmd, void *arg)
return AF_OK;
}
case AF_CONTROL_RESET:
- drop_all_output(s);
+ if (s->avrctx_ok)
+ drop_all_output(s);
return AF_OK;
}
return AF_UNKNOWN;