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
88dc675a
Commit
88dc675a
authored
Jan 05, 2012
by
Hugo Beauzée-Luyssen
Committed by
Jean-Baptiste Kempf
Jan 06, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dash: Don't crash when a segment can't be accessed.
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
cbef7d0c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
9 deletions
+13
-9
modules/stream_filter/dash/http/HTTPConnection.cpp
modules/stream_filter/dash/http/HTTPConnection.cpp
+3
-3
modules/stream_filter/dash/http/HTTPConnectionManager.cpp
modules/stream_filter/dash/http/HTTPConnectionManager.cpp
+8
-4
modules/stream_filter/dash/http/HTTPConnectionManager.h
modules/stream_filter/dash/http/HTTPConnectionManager.h
+2
-2
No files found.
modules/stream_filter/dash/http/HTTPConnection.cpp
View file @
88dc675a
...
...
@@ -66,11 +66,11 @@ void HTTPConnection::parseURL ()
this
->
request
=
"GET "
+
this
->
path
+
" HTTP/1.1
\r\n
"
+
"Host: "
+
this
->
hostname
+
"
\r\n
Connection: close
\r\n\r\n
"
;
}
bool
HTTPConnection
::
init
()
bool
HTTPConnection
::
init
()
{
this
->
urlStream
=
stream_UrlNew
(
this
->
stream
,
this
->
url
.
c_str
()
);
this
->
urlStream
=
stream_UrlNew
(
this
->
stream
,
this
->
url
.
c_str
()
);
if
(
!
this
->
urlStream
)
if
(
this
->
urlStream
==
NULL
)
return
false
;
return
true
;
...
...
modules/stream_filter/dash/http/HTTPConnectionManager.cpp
View file @
88dc675a
...
...
@@ -127,7 +127,8 @@ int HTTPConnectionManager::read (Chunk *chun
this
->
bytesReadChunk
=
0
;
this
->
timeSecChunk
=
0
;
this
->
initConnection
(
chunk
);
if
(
this
->
initConnection
(
chunk
)
==
NULL
)
return
-
1
;
return
this
->
read
(
chunk
,
p_buffer
,
len
);
}
}
...
...
@@ -136,13 +137,16 @@ int HTTPConnectionManager::peek (Chunk *chun
if
(
this
->
chunkMap
.
find
(
chunk
)
!=
this
->
chunkMap
.
end
())
return
this
->
chunkMap
[
chunk
]
->
peek
(
pp_peek
,
i_peek
);
this
->
initConnection
(
chunk
);
if
(
this
->
initConnection
(
chunk
)
==
NULL
)
return
-
1
;
return
this
->
peek
(
chunk
,
pp_peek
,
i_peek
);
}
HTTPConnection
*
HTTPConnectionManager
::
initConnection
(
Chunk
*
chunk
)
IHTTPConnection
*
HTTPConnectionManager
::
initConnection
(
Chunk
*
chunk
)
{
HTTPConnection
*
con
=
new
HTTPConnection
(
chunk
->
getUrl
(),
this
->
stream
);
con
->
init
();
if
(
con
->
init
()
==
false
)
return
NULL
;
this
->
connections
.
push_back
(
con
);
this
->
chunkMap
[
chunk
]
=
con
;
this
->
chunkCount
++
;
...
...
modules/stream_filter/dash/http/HTTPConnectionManager.h
View file @
88dc675a
...
...
@@ -69,8 +69,8 @@ namespace dash
stream_t
*
stream
;
int
chunkCount
;
bool
closeConnection
(
Chunk
*
chunk
);
HTTPConnection
*
initConnection
(
Chunk
*
chunk
);
bool
closeConnection
(
Chunk
*
chunk
);
IHTTPConnection
*
initConnection
(
Chunk
*
chunk
);
};
}
...
...
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