Message ID | tencent_412F74F942882A9B29068B71033C3A7B3A05@qq.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel] libswresample/audioconvert: check whether input frame data is null pointer | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | fail | Make failed |
andriy/make_x86 | fail | Make failed |
diff --git a/libswresample/audioconvert.c b/libswresample/audioconvert.c index 1d75ba1495..b297514b1a 100644 --- a/libswresample/audioconvert.c +++ b/libswresample/audioconvert.c @@ -242,7 +242,7 @@ int swri_audio_convert(AudioConvert *ctx, AudioData *out, AudioData *in, int len 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 *end, *po = out->ch[ch]; - if(!po) + if(!po || !pi) continue; end = po + os * len; ctx->conv_f(po+off*os, pi+off*is, is, os, end);