summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAlfred E. Heggestad <aeh@db.org>2016-06-04 23:18:07 +0200
committerAlfred E. Heggestad <aeh@db.org>2016-06-04 23:18:07 +0200
commit2d396f79d20dbbc1321aa4e705c2f867a97cd307 (patch)
tree19b5fc69a99c18187cf439e7f602f19dcf2212f2 /modules
parent346aaad2b057f823b7181e7b6711badd2554e5c2 (diff)
auloop: check for decode handler
Diffstat (limited to 'modules')
-rw-r--r--modules/auloop/auloop.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/modules/auloop/auloop.c b/modules/auloop/auloop.c
index 03e8afd..05ee623 100644
--- a/modules/auloop/auloop.c
+++ b/modules/auloop/auloop.c
@@ -121,9 +121,14 @@ static int codec_read(struct audio_loop *al, int16_t *sampv, size_t sampc)
if (err)
goto out;
- err = al->ac->dech(al->dec, sampv, &sampc, x, xlen);
- if (err)
- goto out;
+ if (al->ac->dech) {
+ err = al->ac->dech(al->dec, sampv, &sampc, x, xlen);
+ if (err)
+ goto out;
+ }
+ else {
+ info("auloop: no decode handler\n");
+ }
out: