diff options
author | wm4 <wm4@nowhere> | 2016-08-20 14:11:35 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-08-20 14:11:35 +0200 |
commit | 1a8af89b7d09ad8a84410a3d8efe1a9f695cf9a7 (patch) | |
tree | 7ba7621d1ad65ffedb8ab4afa12a92f84ef36dee /video/out | |
parent | e0576294934bd35f44d57f8033909ab515f19b83 (diff) | |
download | mpv-1a8af89b7d09ad8a84410a3d8efe1a9f695cf9a7.tar.bz2 mpv-1a8af89b7d09ad8a84410a3d8efe1a9f695cf9a7.tar.xz |
vo: fix mismatching types in pointer operation
run_control() dereferences an uint32_t as int. Whether this is allowed
depends on what uint32_t is typedefed to (dereferencing an unsigned int
as int should be fine). Fix it by always using int. The uint32_t type
never really made sense.
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/vo.c | 4 | ||||
-rw-r--r-- | video/out/vo.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/video/out/vo.c b/video/out/vo.c index aa92d349e5..31eae5aef6 100644 --- a/video/out/vo.c +++ b/video/out/vo.c @@ -537,13 +537,13 @@ static void run_control(void *p) { void **pp = p; struct vo *vo = pp[0]; - uint32_t request = *(int *)pp[1]; + int request = *(int *)pp[1]; void *data = pp[2]; int ret = vo->driver->control(vo, request, data); *(int *)pp[3] = ret; } -int vo_control(struct vo *vo, uint32_t request, void *data) +int vo_control(struct vo *vo, int request, void *data) { int ret; void *p[] = {vo, &request, data, &ret}; diff --git a/video/out/vo.h b/video/out/vo.h index a5280e5611..8fdb2ed1e8 100644 --- a/video/out/vo.h +++ b/video/out/vo.h @@ -341,7 +341,7 @@ struct mpv_global; struct vo *init_best_video_out(struct mpv_global *global, struct vo_extra *ex); int vo_reconfig(struct vo *vo, struct mp_image_params *p); -int vo_control(struct vo *vo, uint32_t request, void *data); +int vo_control(struct vo *vo, int request, void *data); bool vo_is_ready_for_frame(struct vo *vo, int64_t next_pts); void vo_queue_frame(struct vo *vo, struct vo_frame *frame); void vo_wait_frame(struct vo *vo); |