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
32713271 int rorder;
32723272
32733273 if (c == '\0') {
3274− av_log(ctx, AV_LOG_ERROR,
3275− "Incomplete rorder option. Direction for all 3 rotation orders should be specified.\n");
3276− return AVERROR(EINVAL);
3274+ av_log(ctx, AV_LOG_WARNING,
3275+ "Incomplete rorder option. Direction for all 3 rotation orders should be specified. Switching to default rorder.\n");
3276+ s->rotation_order[0] = YAW;
3277+ s->rotation_order[1] = PITCH;
3278+ s->rotation_order[2] = ROLL;
3279+ break;
32773280 }
32783281
32793282 rorder = get_rorder(c);
32803283 if (rorder == -1) {
3281− av_log(ctx, AV_LOG_ERROR,
3282− "Incorrect rotation order symbol '%c' in rorder option.\n", c);
3283− return AVERROR(EINVAL);
3284+ av_log(ctx, AV_LOG_WARNING,
3285+ "Incorrect rotation order symbol '%c' in rorder option. Switching to default rorder.\n", c);
3286+ s->rotation_order[0] = YAW;
3287+ s->rotation_order[1] = PITCH;
3288+ s->rotation_order[2] = ROLL;
3289+ break;
32843290 }
32853291
32863292 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