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
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) {

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