0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

vo_drm: fix coding style to adhere to guidelines

This commit is contained in:
Marcin Kurczewski 2015-04-21 11:50:44 +02:00 committed by wm4
parent 7f29172baf
commit dedb15a429
2 changed files with 8 additions and 8 deletions

View File

@ -119,14 +119,12 @@ void vt_switcher_poll(struct vt_switcher *s, int timeout_ms)
{ .events = POLLIN, .fd = vt_switcher_pipe[0] },
};
poll(fds, 1, timeout_ms);
if (!fds[0].revents) {
if (!fds[0].revents)
return;
}
unsigned char event;
if (read(fds[0].fd, &event, sizeof(event)) != sizeof(event)) {
if (read(fds[0].fd, &event, sizeof(event)) != sizeof(event))
return;
}
switch (event) {
case EVT_RELEASE:

View File

@ -350,7 +350,8 @@ static void modeset_page_flipped(int fd, unsigned int frame, unsigned int sec,
static int setup_vo_crtc(struct vo *vo)
{
struct priv *p = vo->priv;
if (p->active) return;
if (p->active)
return;
p->old_crtc = drmModeGetCrtc(p->fd, p->dev->crtc);
int ret = drmModeSetCrtc(p->fd, p->dev->crtc,
p->dev->bufs[p->dev->front_buf + BUF_COUNT - 1].fb,
@ -363,7 +364,8 @@ static void release_vo_crtc(struct vo *vo)
{
struct priv *p = vo->priv;
if (!p->active) return;
if (!p->active)
return;
p->active = false;
// wait for current page flip
@ -511,8 +513,8 @@ static void draw_image(struct vo *vo, mp_image_t *mpi)
static void flip_page(struct vo *vo)
{
struct priv *p = vo->priv;
if (!p->active) return;
if (p->pflip_happening) return;
if (!p->active || p->pflip_happening)
return;
int ret = drmModePageFlip(p->fd, p->dev->crtc,
p->dev->bufs[p->dev->front_buf].fb,