summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libswresample/audioconvert.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libswresample/audioconvert.c b/libswresample/audioconvert.c
index 89ee7bfae3..500aa0e5c5 100644
--- a/libswresample/audioconvert.c
+++ b/libswresample/audioconvert.c
@@ -237,10 +237,10 @@ int swri_audio_convert(AudioConvert *ctx, AudioData *out, AudioData *in, int len
const int ich= ctx->ch_map ? ctx->ch_map[ch] : ch;
const int is= ich < 0 ? 0 : (in->planar ? 1 : in->ch_count) * in->bps;
const uint8_t *pi= ich < 0 ? ctx->silence : in->ch[ich];
- uint8_t *po= out->ch[ch];
- uint8_t *end= po + os*len;
+ uint8_t *end, *po = out->ch[ch];
if(!po)
continue;
+ end = po + os * len;
ctx->conv_f(po+off*os, pi+off*is, is, os, end);
}
return 0;