mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-28 17:51:05 +00: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>
This commit is contained in:
parent
8d5de4e12f
commit
0889ebc577
@ -86,6 +86,12 @@ static int noise_init(AVBSFContext *ctx)
|
|||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ctx->par_in->codec_id == AV_CODEC_ID_WRAPPED_AVFRAME &&
|
||||||
|
strcmp(s->amount_str, "0")) {
|
||||||
|
av_log(ctx, AV_LOG_ERROR, "Wrapped AVFrame noising is unsupported\n");
|
||||||
|
return AVERROR_PATCHWELCOME;
|
||||||
|
}
|
||||||
|
|
||||||
ret = av_expr_parse(&s->amount_pexpr, s->amount_str,
|
ret = av_expr_parse(&s->amount_pexpr, s->amount_str,
|
||||||
var_names, NULL, NULL, NULL, NULL, 0, ctx);
|
var_names, NULL, NULL, NULL, NULL, 0, ctx);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user