Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Romain Vimont
VLC
Commits
8af8cab6
Commit
8af8cab6
authored
Jun 01, 2017
by
Thomas Guillem
Browse files
preparser: handle input errors
And don't timeout in case of error.
parent
cecb49ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/playlist/preparser.c
View file @
8af8cab6
...
...
@@ -76,7 +76,8 @@ static int PreparserOpenInput( void* preparser_, void* item_, void** out )
static
int
PreparserProbeInput
(
void
*
preparser_
,
void
*
input_
)
{
return
input_GetState
(
input_
)
==
END_S
;
int
state
=
input_GetState
(
input_
);
return
state
==
END_S
||
state
==
ERROR_S
;
VLC_UNUSED
(
preparser_
);
}
...
...
@@ -88,8 +89,18 @@ static void PreparserCloseInput( void* preparser_, void* input_ )
var_DelCallback
(
input
,
"intf-event"
,
InputEvent
,
preparser
->
worker
);
int
status
=
input_GetState
(
input
)
==
END_S
?
ITEM_PREPARSE_DONE
:
ITEM_PREPARSE_TIMEOUT
;
int
status
;
switch
(
input_GetState
(
input
)
)
{
case
END_S
:
status
=
ITEM_PREPARSE_DONE
;
break
;
case
ERROR_S
:
status
=
ITEM_PREPARSE_FAILED
;
break
;
default:
status
=
ITEM_PREPARSE_TIMEOUT
;
}
input_Stop
(
input
);
input_Close
(
input
);
...
...
Write
Preview
Supports
Markdown
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