Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
VLMC
Commits
a7cdc29f
Commit
a7cdc29f
authored
Feb 19, 2010
by
Hugo Beauzee-Luyssen
Browse files
Avoid infinite loop when metadata computing fails.
parent
372863b9
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Metadata/MetaDataWorker.cpp
View file @
a7cdc29f
...
...
@@ -114,9 +114,16 @@ MetaDataWorker::metaDataAvailable()
//will trigger exception... so we shut it up.
if
(
m_media
->
getFileType
()
!=
Media
::
Audio
)
{
while
(
m_mediaPlayer
->
hasVout
()
==
false
)
m_timer
.
restart
();
while
(
m_mediaPlayer
->
hasVout
()
==
false
&&
m_timer
.
elapsed
()
<
3000
)
{
SleepMS
(
1
);
//Ugly isn't it :)
SleepMS
(
10
);
//Ugly isn't it :)
}
if
(
m_mediaPlayer
->
hasVout
()
==
false
)
{
emit
failed
(
m_media
);
return
;
}
quint32
width
,
height
;
...
...
src/Metadata/MetaDataWorker.h
View file @
a7cdc29f
...
...
@@ -24,10 +24,13 @@
#ifndef METADATAWORKER_H
#define METADATAWORKER_H
#include
"Media.h"
#include
<QList>
#include
<QTemporaryFile>
#include
<QLabel>
#include
"Media.h"
#include
<QTemporaryFile>
#include
<QTime>
namespace
LibVLCpp
{
class
MediaPlayer
;
...
...
@@ -66,6 +69,7 @@ class MetaDataWorker : public QObject
bool
m_lengthHasChanged
;
unsigned
char
*
m_audioBuffer
;
QTime
m_timer
;
private
slots
:
void
renderSnapshot
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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