aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/noise_bsf.c
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:33:16 +0200
commit76ee3e41df5157317ee209d3e6cc0829af5f963f (patch)
tree778fd46ac63eb7d931125c0ded37d07f73ce68aa /libavcodec/noise_bsf.c
parenta957d604a20f7de66afd676c07b047c97da2393a (diff)
downloadffmpeg-76ee3e41df5157317ee209d3e6cc0829af5f963f.tar.gz
avcodec/noise_bsf: Check for wrapped framesn4.1.11release/4.1
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/noise_bsf.c')
-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 d79f63b777..42533c6df9 100644
--- a/libavcodec/noise_bsf.c
+++ b/libavcodec/noise_bsf.c
@@ -44,6 +44,11 @@ static int noise(AVBSFContext *ctx, AVPacket *pkt)
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_ref(ctx, pkt);
if (ret < 0)
return ret;