axfer: mapper: fix parameter check for demuxer

Each container should be configured to store one saple per frame in
demuxer case. This commit fixes the bug.

Fixes: 25c8e3bebb ('axfer: add support for a mapper for multiple target')
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Sakamoto 2019-07-28 13:43:34 +09:00 committed by Takashi Iwai
parent 3aea4fedf9
commit 0bc366a15c

View File

@ -114,7 +114,8 @@ static int multiple_pre_process(struct mapper_context *mapper,
// configured to store one sample per frame.
if (mapper->type == MAPPER_TYPE_DEMUXER) {
for (i = 0; i < cntr_count; ++i) {
if (cntrs->samples_per_frame != 1)
cntr = cntrs + i;
if (cntr->samples_per_frame != 1)
return -EINVAL;
}
}