History

avfilter/vf_v360: handle gracefully invalid values for rorder option

Paul B Mahol committed 6 years ago

Commit 08a21c11 parent 177c68e1 file · +12 −6Browse files

Unified · Split

libavfilter/vf_v360.c+12−6
@@ -3271,16 +3271,22 @@ static int config_output(AVFilterLink *outlink) · 3270 unmodified lines
3271 int rorder;3271 int rorder;
3272 3272
3273 if (c == '\0') {3273 if (c == '\0') {
3274 av_log(ctx, AV_LOG_ERROR,3274 av_log(ctx, AV_LOG_WARNING,
3275 "Incomplete rorder option. Direction for all 3 rotation orders should be specified.\n");3275 "Incomplete rorder option. Direction for all 3 rotation orders should be specified. Switching to default rorder.\n");
3276 return AVERROR(EINVAL);3276 s->rotation_order[0] = YAW;
3277 s->rotation_order[1] = PITCH;
3278 s->rotation_order[2] = ROLL;
3279 break;
3277 }3280 }
3278 3281
3279 rorder = get_rorder(c);3282 rorder = get_rorder(c);
3280 if (rorder == -1) {3283 if (rorder == -1) {
3281 av_log(ctx, AV_LOG_ERROR,3284 av_log(ctx, AV_LOG_WARNING,
3282 "Incorrect rotation order symbol '%c' in rorder option.\n", c);3285 "Incorrect rotation order symbol '%c' in rorder option. Switching to default rorder.\n", c);
3283 return AVERROR(EINVAL);3286 s->rotation_order[0] = YAW;
3287 s->rotation_order[1] = PITCH;
3288 s->rotation_order[2] = ROLL;
3289 break;
3284 }3290 }
3285 3291
3286 s->rotation_order[order] = rorder;3292 s->rotation_order[order] = rorder;

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