From: Takashi Iwai Date: Tue, 15 Jun 2021 17:31:18 +0000 (+0200) Subject: a52: Correct data transfer in planar mode X-Git-Tag: v1.2.6~24 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=3726d49ba537c1546782a62ba0b29db09004ea7c;p=alsa-plugins.git a52: Correct data transfer in planar mode The buffer offset was incorrectly calculated in samples. Signed-off-by: Takashi Iwai --- diff --git a/a52/pcm_a52.c b/a52/pcm_a52.c index b1a07b4..95d2c3f 100644 --- a/a52/pcm_a52.c +++ b/a52/pcm_a52.c @@ -332,7 +332,7 @@ static int fill_data(snd_pcm_ioplug_t *io, #ifdef USE_AVCODEC_FRAME if (use_planar(rec) && !interleaved) { - memcpy(rec->frame->data[ch] + rec->filled, src, size * 2); + memcpy(rec->frame->data[ch] + rec->filled * 2, src, size * 2); continue; } #endif @@ -358,7 +358,7 @@ static int fill_data(snd_pcm_ioplug_t *io, #ifdef USE_AVCODEC_FRAME if (use_planar(rec) && !interleaved) { - memcpy(rec->frame->data[ch] + rec->filled, src, size * 4); + memcpy(rec->frame->data[ch] + rec->filled * 4, src, size * 4); continue; } #endif