Wrapped frames contain pointers so they need specific code to noise them, the generic code would lead to segfaults
Unified · Split
| @@ -86,6 +86,12 @@ static int noise_init(AVBSFContext *ctx) · 85 unmodified lines | ||
| 86 | 86 | return AVERROR(ENOMEM); |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | + if (ctx->par_in->codec_id == AV_CODEC_ID_WRAPPED_AVFRAME && | |
| 90 | + strcmp(s->amount_str, "0")) { | |
| 91 | + av_log(ctx, AV_LOG_ERROR, "Wrapped AVFrame noising is unsupported\n"); | |
| 92 | + return AVERROR_PATCHWELCOME; | |
| 93 | + } | |
| 94 | + | |
| 89 | 95 | ret = av_expr_parse(&s->amount_pexpr, s->amount_str, |
| 90 | 96 | var_names, NULL, NULL, NULL, NULL, 0, ctx); |
| 91 | 97 | if (ret < 0) { |