History

avfilter/vf_v360: make reset_rot option not lose its value

Unless -1 value is provided then rotation is reset single time.

Paul B Mahol committed 5 years ago

Commit 960efa91 parent 1e22ad21 file · +3 −2Browse files

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

Unified · Split

libavfilter/vf_v360.c+3−2
@@ -164,7 +164,7 @@ static const AVOption v360_options[] = { · 163 unmodified lines
164164 { "iv_fov", "input vertical field of view", OFFSET(iv_fov), AV_OPT_TYPE_FLOAT, {.dbl=0.f}, 0.f, 360.f,TFLAGS, "iv_fov"},
165165 { "id_fov", "input diagonal field of view", OFFSET(id_fov), AV_OPT_TYPE_FLOAT, {.dbl=0.f}, 0.f, 360.f,TFLAGS, "id_fov"},
166166 {"alpha_mask", "build mask in alpha plane", OFFSET(alpha), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS, "alpha"},
167− { "reset_rot", "reset rotation", OFFSET(reset_rot), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1,TFLAGS, "reset_rot"},
167+ { "reset_rot", "reset rotation", OFFSET(reset_rot), AV_OPT_TYPE_BOOL, {.i64=0}, -1, 1,TFLAGS, "reset_rot"},
168168 { NULL }
169169 };
170170
@@ -4962,7 +4962,8 @@ static int process_command(AVFilterContext *ctx, const char *cmd, const char *ar · 4791 unmodified lines
49624962 int ret;
49634963
49644964 s->yaw = s->pitch = s->roll = 0.f;
4965− s->reset_rot = 0;
4965+ if (s->reset_rot < 0)
4966+ s->reset_rot = 0;
49664967
49674968 ret = ff_filter_process_command(ctx, cmd, args, res, res_len, flags);
49684969 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