diff options
author | wm4 <wm4@nowhere> | 2014-07-18 15:11:21 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-07-18 15:11:21 +0200 |
commit | 2646874369b0c5beb2aa2d443734745a19ad4d6c (patch) | |
tree | 3c19e850df1f0b524ff3bedf7a7bf1cfdd0c1b85 /player/playloop.c | |
parent | 7083f88ca8b98aa74dbc9e34d5c5cf6e150cfe0b (diff) | |
download | mpv-2646874369b0c5beb2aa2d443734745a19ad4d6c.tar.bz2 mpv-2646874369b0c5beb2aa2d443734745a19ad4d6c.tar.xz |
video: use symbolic constants instead of magic integers
In my opinion this is not really necessary, since there's only a single
user of update_video(), but others reading this code would probably hate
me for using magic integer values instead of symbolic constants.
This should be a purely cosmetic commit; any changes in behavior are
bugs.
Diffstat (limited to 'player/playloop.c')
-rw-r--r-- | player/playloop.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/player/playloop.c b/player/playloop.c index a3fcf133e3..c18c1cb5ce 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -970,7 +970,7 @@ void run_playloop(struct MPContext *mpctx) break; } - if (r == 0) { + if (r == VD_EOF) { if (!mpctx->playing_last_frame && mpctx->last_frame_duration > 0) { mpctx->time_frame += mpctx->last_frame_duration; mpctx->last_frame_duration = 0; @@ -978,23 +978,23 @@ void run_playloop(struct MPContext *mpctx) MP_VERBOSE(mpctx, "showing last frame\n"); } if (mpctx->playing_last_frame) { - r = 1; // don't stop playback yet + r = VD_PROGRESS; // don't stop playback yet MP_TRACE(mpctx, "still showing last frame\n"); } } video_left = r > 0; - if (r == 3) + if (r == VD_WAIT) break; if (mpctx->restart_playback) mpctx->sleeptime = 0; - if (r == 2) + if (r == VD_NEW_FRAME) MP_TRACE(mpctx, "frametime=%5.3f\n", frame_time); - if (r == 2 && !mpctx->restart_playback) { + if (r == VD_NEW_FRAME && !mpctx->restart_playback) { mpctx->time_frame += frame_time / opts->playback_speed; adjust_sync(mpctx, frame_time); } @@ -1010,7 +1010,7 @@ void run_playloop(struct MPContext *mpctx) break; } - if (r != 2 && !mpctx->playing_last_frame) { + if (r != VD_NEW_FRAME && !mpctx->playing_last_frame) { mpctx->sleeptime = 0; break; } @@ -1060,7 +1060,7 @@ void run_playloop(struct MPContext *mpctx) mpctx->playing_last_frame = false; // last frame case (don't set video_left - consider format changes) - if (r != 2) + if (r != VD_NEW_FRAME) break; //=================== FLIP PAGE (VIDEO BLT): ====================== |