aboutsummaryrefslogtreecommitdiffhomepage
path: root/libmpcodecs/dec_audio.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmpcodecs/dec_audio.c')
-rw-r--r--libmpcodecs/dec_audio.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/libmpcodecs/dec_audio.c b/libmpcodecs/dec_audio.c
index d0fa3b3fd1..5445eeac22 100644
--- a/libmpcodecs/dec_audio.c
+++ b/libmpcodecs/dec_audio.c
@@ -388,13 +388,8 @@ int decode_audio(sh_audio_t *sh_audio, unsigned char *buf, int minlen,
af_data_t *pafd; // filter output
ad_functions_t *mpadec = sh_audio->ad_driver;
- if (!sh_audio->inited)
- return -1; // no codec
- if (!sh_audio->afilter) {
- // no filter, just decode:
- // FIXME: don't drop initial decoded data in a_buffer!
- return mpadec->decode_audio(sh_audio, buf, minlen, maxlen);
- }
+ if (!sh_audio->inited || !sh_audio->afilter)
+ abort();
declen = af_calc_insize_constrained(sh_audio->afilter, minlen, maxlen,
sh_audio->a_buffer_size -