summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2020-02-25 11:12:02 +0100
committerPaul B Mahol <onemda@gmail.com>2020-02-25 11:12:02 +0100
commit08a21c1fd8cf4dc25edd0a6d1e9474b151bb54a2 (patch)
tree9d20556565a7eabfc1327b2558fda7ac69ff513e /libavfilter
parent177c68e3496e0d807641110f2a76d25ad71e45bb (diff)
downloadffmpeg-08a21c1fd8cf4dc25edd0a6d1e9474b151bb54a2.tar.gz
avfilter/vf_v360: handle gracefully invalid values for rorder option
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vf_v360.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c
index 6477303ca5..6b0d8b21ae 100644
--- a/libavfilter/vf_v360.c
+++ b/libavfilter/vf_v360.c
@@ -3271,16 +3271,22 @@ static int config_output(AVFilterLink *outlink)
int rorder;
if (c == '\0') {
- av_log(ctx, AV_LOG_ERROR,
- "Incomplete rorder option. Direction for all 3 rotation orders should be specified.\n");
- return AVERROR(EINVAL);
+ av_log(ctx, AV_LOG_WARNING,
+ "Incomplete rorder option. Direction for all 3 rotation orders should be specified. Switching to default rorder.\n");
+ s->rotation_order[0] = YAW;
+ s->rotation_order[1] = PITCH;
+ s->rotation_order[2] = ROLL;
+ break;
}
rorder = get_rorder(c);
if (rorder == -1) {
- av_log(ctx, AV_LOG_ERROR,
- "Incorrect rotation order symbol '%c' in rorder option.\n", c);
- return AVERROR(EINVAL);
+ av_log(ctx, AV_LOG_WARNING,
+ "Incorrect rotation order symbol '%c' in rorder option. Switching to default rorder.\n", c);
+ s->rotation_order[0] = YAW;
+ s->rotation_order[1] = PITCH;
+ s->rotation_order[2] = ROLL;
+ break;
}
s->rotation_order[order] = rorder;