[FFmpeg-devel] [PATCH] libswresample/audioconvert: check whether input frame data is null pointer
xufuji456
839789740 at qq.com
Wed Mar 1 05:59:19 EET 2023
---
libswresample/audioconvert.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
2.32.0 (Apple Git-132)
More information about the ffmpeg-devel
mailing list