History

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

Michael Niedermayer committed 3 years ago

Commit 0889ebc1 parent 8d5de4e1 file · +6 −0Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/noise_bsf.c+6−0
@@ -86,6 +86,12 @@ static int noise_init(AVBSFContext *ctx) · 85 unmodified lines
8686 return AVERROR(ENOMEM);
8787 }
8888
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+
8995 ret = av_expr_parse(&s->amount_pexpr, s->amount_str,
9096 var_names, NULL, NULL, NULL, NULL, 0, ctx);
9197 if (ret < 0) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t