tinycompress: plugin: Set codec params in SETUP state

Allow codec params to be set in COMPRESS_PLUG_SETUP state as well.

CRs-Fixed: 3023915

Change-Id: Ic1f93628c9fa325653cbd65a0cc827310276f81d
This commit is contained in:
Ritu Sharma 2021-09-23 17:35:45 +05:30 committed by Bartłomiej Rudecki
parent 14215fe64e
commit 1eb2e5bf3b

View file

@ -86,7 +86,8 @@ static int compress_plug_set_params(struct compress_plug_data *plug_data,
if (plugin->state == COMPRESS_PLUG_STATE_RUNNING)
return plugin->ops->set_params(plugin, params);
else if (plugin->state != COMPRESS_PLUG_STATE_OPEN)
else if (plugin->state != COMPRESS_PLUG_STATE_OPEN &&
plugin->state != COMPRESS_PLUG_STATE_SETUP)
return -EBADFD;
if (params->buffer.fragment_size == 0 ||