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 | return AVERROR(ENOMEM); | 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 | ret = av_expr_parse(&s->amount_pexpr, s->amount_str, | 95 | ret = av_expr_parse(&s->amount_pexpr, s->amount_str, |
| 90 | var_names, NULL, NULL, NULL, NULL, 0, ctx); | 96 | var_names, NULL, NULL, NULL, NULL, 0, ctx); |
| 91 | if (ret < 0) { | 97 | if (ret < 0) { |