aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2023-06-04 19:59:40 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2023-06-07 01:35:38 +0200
commit7b4662fae5e9e0e3fe70d93471b04ccdb7c0e2d7 (patch)
treebc5c5081c3a052f98ad65e62b44bae608782b300 /libavcodec
parent5a797e7c23a1f2eb696a2aef76b21c617ab37bef (diff)
downloadffmpeg-7b4662fae5e9e0e3fe70d93471b04ccdb7c0e2d7.tar.gz
avcodec/noise_bsf: Check for wrapped frames
Wrapped frames contain pointers so they need specific code to noise them, the generic code would lead to segfaults Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 0889ebc577749ee6abc620bc9030d2002487935f) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/noise_bsf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/noise_bsf.c b/libavcodec/noise_bsf.c
index 84b94032ad..42b632dd7a 100644
--- a/libavcodec/noise_bsf.c
+++ b/libavcodec/noise_bsf.c
@@ -45,6 +45,11 @@ static int noise(AVBSFContext *ctx, AVPacket *out)
if (amount <= 0)
return AVERROR(EINVAL);
+ if (ctx->par_in->codec_id == AV_CODEC_ID_WRAPPED_AVFRAME) {
+ av_log(ctx, AV_LOG_ERROR, "Wrapped AVFrame noising is unsupported\n");
+ return AVERROR_PATCHWELCOME;
+ }
+
ret = ff_bsf_get_packet(ctx, &in);
if (ret < 0)
return ret;