mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
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 0889ebc577
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
724f2b3fbd
commit
2dcc7dbba8
@ -42,6 +42,11 @@ static int noise(AVBSFContext *ctx, AVPacket *pkt)
|
|||||||
if (amount <= 0)
|
if (amount <= 0)
|
||||||
return AVERROR(EINVAL);
|
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);
|
ret = ff_bsf_get_packet_ref(ctx, pkt);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user