summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaweł Forysiuk <tuxator@o2.pl>2013-11-03 23:28:13 +0100
committerwm4 <wm4@nowhere>2013-11-04 00:13:24 +0100
commit25affdcc886ce010995804553396d81d90a321d3 (patch)
tree95008ff571d39edbeac20d9e9df42a30b6bc201a
parent2d58fb3b8e7e87a939220f50a51294f8efdc51e1 (diff)
downloadmpv-25affdcc886ce010995804553396d81d90a321d3.tar.bz2
mpv-25affdcc886ce010995804553396d81d90a321d3.tar.xz
Fix -Wshadow warning about seek function in playloop.c
mpvcore/player/playloop.c: In function 'seek': mpvcore/player/playloop.c:209:54: warning: declaration of 'seek' shadows a global declaration [-Wshadow] mpvcore/player/playloop.c:209:12: warning: shadowed declaration is here [-Wshadow] mpvcore/player/playloop.c: In function 'queue_seek': mpvcore/player/playloop.c:360:25: warning: declaration of 'seek' shadows a global declaration [-Wshadow] mpvcore/player/playloop.c:209:12: warning: shadowed declaration is here [-Wshadow] Signed-off-by: wm4 <wm4@nowhere>
-rw-r--r--mpvcore/player/playloop.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/mpvcore/player/playloop.c b/mpvcore/player/playloop.c
index 90525a5ca2..c2263ab57e 100644
--- a/mpvcore/player/playloop.c
+++ b/mpvcore/player/playloop.c
@@ -206,8 +206,8 @@ static void seek_reset(struct MPContext *mpctx, bool reset_ao, bool reset_ac)
}
// return -1 if seek failed (non-seekable stream?), 0 otherwise
-static int seek(MPContext *mpctx, struct seek_params seek,
- bool timeline_fallthrough)
+static int mp_seek(MPContext *mpctx, struct seek_params seek,
+ bool timeline_fallthrough)
{
struct MPOpts *opts = mpctx->opts;
uint64_t prev_seek_ts = mpctx->vo_pts_history_seek_ts;
@@ -392,7 +392,7 @@ void queue_seek(struct MPContext *mpctx, enum seek_type type, double amount,
void execute_queued_seek(struct MPContext *mpctx)
{
if (mpctx->seek.type) {
- seek(mpctx, mpctx->seek, false);
+ mp_seek(mpctx, mpctx->seek, false);
mpctx->seek = (struct seek_params){0};
}
}
@@ -818,10 +818,10 @@ static void handle_backstep(struct MPContext *mpctx)
// The whole point is getting frames _before_ that PTS,
// so apply an arbitrary offset. (In theory the offset
// has to be large enough to reach the previous frame.)
- seek(mpctx, (struct seek_params){
- .type = MPSEEK_ABSOLUTE,
- .amount = current_pts - 1.0,
- }, false);
+ mp_seek(mpctx, (struct seek_params){
+ .type = MPSEEK_ABSOLUTE,
+ .amount = current_pts - 1.0,
+ }, false);
// Don't leave hr-seek mode. If all goes right, hr-seek
// mode is cancelled as soon as the frame before
// current_pts is found during hr-seeking.
@@ -1190,10 +1190,10 @@ void run_playloop(struct MPContext *mpctx)
&& (opts->gapless_audio || buffered_audio < 0.05)
&& (!mpctx->paused || was_restart)) {
if (end_is_chapter) {
- seek(mpctx, (struct seek_params){
- .type = MPSEEK_ABSOLUTE,
- .amount = mpctx->timeline[mpctx->timeline_part+1].start
- }, true);
+ mp_seek(mpctx, (struct seek_params){
+ .type = MPSEEK_ABSOLUTE,
+ .amount = mpctx->timeline[mpctx->timeline_part+1].start
+ }, true);
} else
mpctx->stop_play = AT_END_OF_FILE;
sleeptime = 0;