Browse Source

player: timer: don't interpolate last point after resume from pause

Wait for a point to be updated before using interpolation.

Fixes #28353

(No problem on Qt as it use the timer API directly).
work/unnecessary-disc-string
Thomas Guillem 7 months ago
committed by Steve Lhomme
parent
commit
46214fdceb
  1. 1
      src/player/player.h
  2. 5
      src/player/timer.c

1
src/player/player.h

@ -234,6 +234,7 @@ struct vlc_player_timer
{
UPDATE_STATE_RESUMED,
UPDATE_STATE_PAUSED,
UPDATE_STATE_RESUMING,
} update_state;
bool stopping;

5
src/player/timer.c

@ -276,7 +276,7 @@ vlc_player_UpdateTimerEvent(vlc_player_t *player, vlc_es_id_t *es_source,
case VLC_PLAYER_TIMER_EVENT_PLAYING:
assert(!player->timer.stopping);
player->timer.update_state = UPDATE_STATE_RESUMED;
player->timer.update_state = UPDATE_STATE_RESUMING;
break;
case VLC_PLAYER_TIMER_EVENT_STOPPING:
@ -420,6 +420,9 @@ vlc_player_UpdateTimerBestSource(vlc_player_t *player, vlc_es_id_t *es_source,
if (!vlc_list_is_empty(&source->listeners))
vlc_player_SendTimerSourceUpdates(player, source, force_update,
&source->point);
if (player->timer.update_state == UPDATE_STATE_RESUMING)
player->timer.update_state = UPDATE_STATE_RESUMED;
}
}
}

Loading…
Cancel
Save