diff options
author | Takashi Iwai <tiwai@suse.de> | 2020-05-28 10:08:46 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2020-05-28 10:08:50 +0200 |
commit | 6d2848402619f33895e419430ad43a223c4866fc (patch) | |
tree | a88115a04139f68e5240dfdf40e11c752a3e73a5 /sound/core/oss | |
parent | e0b2db351bc708037571deb3fc82c7d9043b4ea8 (diff) | |
parent | 630e36126e420e1756378b3427b42711ce0b9ddd (diff) |
Merge branch 'for-linus' into for-next
Back-merge 5.7-devel branch for further development.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/oss')
-rw-r--r-- | sound/core/oss/pcm_plugin.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/core/oss/pcm_plugin.c b/sound/core/oss/pcm_plugin.c index 59d62f05658f..1545f8fdb4db 100644 --- a/sound/core/oss/pcm_plugin.c +++ b/sound/core/oss/pcm_plugin.c @@ -205,13 +205,14 @@ static snd_pcm_sframes_t calc_dst_frames(struct snd_pcm_substream *plug, plugin = snd_pcm_plug_first(plug); while (plugin && frames > 0) { plugin_next = plugin->next; + if (check_size && plugin->buf_frames && + frames > plugin->buf_frames) + frames = plugin->buf_frames; if (plugin->dst_frames) { frames = plugin->dst_frames(plugin, frames); if (frames < 0) return frames; } - if (check_size && frames > plugin->buf_frames) - frames = plugin->buf_frames; plugin = plugin_next; } return frames; @@ -225,14 +226,15 @@ static snd_pcm_sframes_t calc_src_frames(struct snd_pcm_substream *plug, plugin = snd_pcm_plug_last(plug); while (plugin && frames > 0) { - if (check_size && frames > plugin->buf_frames) - frames = plugin->buf_frames; plugin_prev = plugin->prev; if (plugin->src_frames) { frames = plugin->src_frames(plugin, frames); if (frames < 0) return frames; } + if (check_size && plugin->buf_frames && + frames > plugin->buf_frames) + frames = plugin->buf_frames; plugin = plugin_prev; } return frames; |