Merge branch 'epirat-fastseek-based-on-remote' into 'master'

[RFC] access: file: do not report FASTSEEK for remote files

Closes #27152

See merge request videolan/vlc!2295
This commit is contained in:
Marvin Scholz 2024-04-28 07:10:58 +00:00
commit 2ae2233b18
1 changed files with 5 additions and 1 deletions

View File

@ -350,11 +350,15 @@ static int FileControl( stream_t *p_access, int i_query, va_list args )
switch( i_query )
{
case STREAM_CAN_SEEK:
case STREAM_CAN_FASTSEEK:
pb_bool = va_arg( args, bool * );
*pb_bool = (p_access->pf_seek != NULL);
break;
case STREAM_CAN_FASTSEEK:
pb_bool = va_arg( args, bool * );
*pb_bool = (!IsRemote (p_sys->fd, p_access->psz_filepath) && (p_access->pf_seek != NULL));
break;
case STREAM_CAN_PAUSE:
case STREAM_CAN_CONTROL_PACE:
pb_bool = va_arg( args, bool * );