Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
1d81d485
Commit
1d81d485
authored
Jan 26, 2015
by
Ludovic Fauvet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: don't try to resume playback on the same input file
Close #11704
parent
3d33cac9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/input_manager.cpp
+9
-1
modules/gui/qt4/input_manager.hpp
modules/gui/qt4/input_manager.hpp
+1
-0
No files found.
modules/gui/qt4/input_manager.cpp
View file @
1d81d485
...
...
@@ -127,11 +127,13 @@ void InputManager::setInput( input_thread_t *_p_input )
p_item
=
input_GetItem
(
p_input
);
emit
rateChanged
(
var_GetFloat
(
p_input
,
"rate"
)
);
char
*
uri
=
input_item_GetURI
(
p_item
);
/* Get Saved Time */
if
(
p_item
->
i_type
==
ITEM_TYPE_FILE
)
{
int
i_time
=
RecentsMRL
::
getInstance
(
p_intf
)
->
time
(
p_item
->
psz_uri
);
if
(
i_time
>
0
&&
if
(
i_time
>
0
&&
qfu
(
uri
)
!=
lastURI
&&
!
var_GetFloat
(
p_input
,
"run-time"
)
&&
!
var_GetFloat
(
p_input
,
"start-time"
)
&&
!
var_GetFloat
(
p_input
,
"stop-time"
)
)
...
...
@@ -139,6 +141,11 @@ void InputManager::setInput( input_thread_t *_p_input )
emit
resumePlayback
(
(
int64_t
)
i_time
*
1000
);
}
}
// Save the latest URI to avoid asking to restore the
// position on the same input file.
lastURI
=
qfu
(
uri
);
free
(
uri
);
}
else
{
...
...
@@ -1097,6 +1104,7 @@ void MainInputManager::customEvent( QEvent *event )
void
MainInputManager
::
stop
()
{
playlist_Stop
(
THEPL
);
getIM
()
->
lastURI
.
clear
();
}
void
MainInputManager
::
next
()
...
...
modules/gui/qt4/input_manager.hpp
View file @
1d81d485
...
...
@@ -154,6 +154,7 @@ private:
input_item_t
*
p_item
;
int
i_old_playing_status
;
QString
oldName
;
QString
lastURI
;
QString
artUrl
;
float
f_rate
;
float
f_cache
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment