mirror of https://git.videolan.org/git/ffmpeg.git
libswresample/audioconvert: Fix undefined NULL + 0
Affected 26 FATE tests like swr-resample_async-s16p-44100-8000. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
f83976344e
commit
64977ed7ae
|
@ -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 ich= ctx->ch_map ? ctx->ch_map[ch] : ch;
|
||||||
const int is= ich < 0 ? 0 : (in->planar ? 1 : in->ch_count) * in->bps;
|
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];
|
const uint8_t *pi= ich < 0 ? ctx->silence : in->ch[ich];
|
||||||
uint8_t *po= out->ch[ch];
|
uint8_t *end, *po = out->ch[ch];
|
||||||
uint8_t *end= po + os*len;
|
|
||||||
if(!po)
|
if(!po)
|
||||||
continue;
|
continue;
|
||||||
|
end = po + os * len;
|
||||||
ctx->conv_f(po+off*os, pi+off*is, is, os, end);
|
ctx->conv_f(po+off*os, pi+off*is, is, os, end);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue