Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
4ff2a9a2
Commit
4ff2a9a2
authored
Sep 03, 2005
by
Steve Lhomme
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* prevent crashes when a stream is not opened correctly
parent
cb2ad9ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
11 deletions
+25
-11
include/vlc_stream.h
include/vlc_stream.h
+3
-0
modules/demux/mkv.cpp
modules/demux/mkv.cpp
+22
-11
No files found.
include/vlc_stream.h
View file @
4ff2a9a2
...
...
@@ -123,6 +123,9 @@ static inline int stream_Control( stream_t *s, int i_query, ... )
va_list
args
;
int
i_result
;
if
(
s
==
NULL
)
return
VLC_EGENERIC
;
va_start
(
args
,
i_query
);
i_result
=
s
->
pf_control
(
s
,
i_query
,
args
);
va_end
(
args
);
...
...
modules/demux/mkv.cpp
View file @
4ff2a9a2
...
...
@@ -1481,21 +1481,30 @@ static int Open( vlc_object_t * p_this )
#endif
{
// test wether this file belongs to our family
vlc_stream_io_callback
*
p_file_io
=
new
vlc_stream_io_callback
(
stream_UrlNew
(
p_demux
,
s_filename
.
c_str
()),
VLC_TRUE
);
EbmlStream
*
p_estream
=
new
EbmlStream
(
*
p_file_io
);
p_stream
=
p_sys
->
AnalyseAllSegmentsFound
(
p_estream
);
if
(
p_stream
==
NULL
)
stream_t
*
p_file_stream
=
stream_UrlNew
(
p_demux
,
s_filename
.
c_str
());
if
(
p_file_stream
!=
NULL
)
{
msg_Dbg
(
p_demux
,
"the file '%s' will not be used"
,
s_filename
.
c_str
()
);
delete
p_estream
;
delete
p_file_io
;
vlc_stream_io_callback
*
p_file_io
=
new
vlc_stream_io_callback
(
p_file_stream
,
VLC_TRUE
);
EbmlStream
*
p_estream
=
new
EbmlStream
(
*
p_file_io
);
p_stream
=
p_sys
->
AnalyseAllSegmentsFound
(
p_estream
);
if
(
p_stream
==
NULL
)
{
msg_Dbg
(
p_demux
,
"the file '%s' will not be used"
,
s_filename
.
c_str
()
);
delete
p_estream
;
delete
p_file_io
;
}
else
{
p_stream
->
p_in
=
p_file_io
;
p_stream
->
p_es
=
p_estream
;
p_sys
->
streams
.
push_back
(
p_stream
);
}
}
else
{
p_stream
->
p_in
=
p_file_io
;
p_stream
->
p_es
=
p_estream
;
p_sys
->
streams
.
push_back
(
p_stream
);
msg_Dbg
(
p_demux
,
"the file '%s' cannot be opened"
,
s_filename
.
c_str
()
);
}
}
}
...
...
@@ -3324,6 +3333,8 @@ size_t vlc_stream_io_callback::write( const void *p_buffer, size_t i_size )
}
uint64
vlc_stream_io_callback
::
getFilePointer
(
void
)
{
if
(
s
==
NULL
)
return
0
;
return
stream_Tell
(
s
);
}
void
vlc_stream_io_callback
::
close
(
void
)
...
...
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