input: thumbnailer: remove seek to same position
2 unresolved threads
2 unresolved threads
Compare changes
Conflict: This file was modified in the source branch, but removed in the target branch.
Ask someone with write access to resolve it.
+ 7
− 3
@@ -177,11 +177,15 @@ RunnableRun(void *userdata)
@@ -261,7 +265,7 @@ vlc_thumbnailer_RequestByTime( vlc_thumbnailer_t *thumbnailer,
It seems that it should be done closer to the call using this value: the one calling input_SetTime().
But then if you dig into what it does, it calls
INPUT_CONTROL_SET_TIME
. The same wayvlc_player_SeekByTime()
does. And the documentation ofvlc_player_SeekByTime()
doesn't mention that the time has to be shifted and it's in fact not shifted either. So if the problem exists here, it exists there and might be fixed in a more generic way. Probably in the single location that handles this internal control in input.c
This assumes the provided times are shifted with VLC_TICK_0, as seen in the next commit. But IMO this is not the proper place to do the shift. So IMO is should be tested against 0.
Also it seems that the goal is to avoid a costly seeking operation, because
INPUT_CONTROL_SET_TIME
ends up doing a PCR Reset no matter what. But it doesn't have to be that way. We can callvlc_demux_GetTime()
and check that it's not the same value as the current time. If it is then we don't need the PCR reset and thedemux_SetTime()
. And you have optimized seeking forinput_SetTime()
callers andvlc_player_SeekByTime()
callers.