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
d12d9650
Commit
d12d9650
authored
Feb 11, 2012
by
Christopher Mueller
Committed by
Hugo Beauzée-Luyssen
Feb 14, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dash: downloader avoid div by zero
Signed-off-by:
Hugo Beauzée-Luyssen
<
beauze.h@gmail.com
>
parent
5a3cb153
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
modules/stream_filter/dash/DASHDownloader.cpp
modules/stream_filter/dash/DASHDownloader.cpp
+4
-0
modules/stream_filter/dash/DASHDownloader.h
modules/stream_filter/dash/DASHDownloader.h
+2
-1
No files found.
modules/stream_filter/dash/DASHDownloader.cpp
View file @
d12d9650
...
@@ -87,6 +87,10 @@ void* DASHDownloader::download (void *thread_sys)
...
@@ -87,6 +87,10 @@ void* DASHDownloader::download (void *thread_sys)
{
{
block_t
*
bufBlock
=
block_Alloc
(
ret
);
block_t
*
bufBlock
=
block_Alloc
(
ret
);
memcpy
(
bufBlock
->
p_buffer
,
block
->
p_buffer
,
ret
);
memcpy
(
bufBlock
->
p_buffer
,
block
->
p_buffer
,
ret
);
if
(
currentChunk
->
getBitrate
()
<=
0
)
currentChunk
->
setBitrate
(
CHUNKDEFAULTBITRATE
);
bufBlock
->
i_length
=
(
mtime_t
)((
ret
*
8
)
/
((
float
)
currentChunk
->
getBitrate
()
/
1000000
));
bufBlock
->
i_length
=
(
mtime_t
)((
ret
*
8
)
/
((
float
)
currentChunk
->
getBitrate
()
/
1000000
));
buffer
->
put
(
bufBlock
);
buffer
->
put
(
bufBlock
);
}
}
...
...
modules/stream_filter/dash/DASHDownloader.h
View file @
d12d9650
...
@@ -30,7 +30,8 @@
...
@@ -30,7 +30,8 @@
#include "exceptions/EOFException.h"
#include "exceptions/EOFException.h"
#include "buffer/BlockBuffer.h"
#include "buffer/BlockBuffer.h"
#define BLOCKSIZE 32768
#define BLOCKSIZE 32768
#define CHUNKDEFAULTBITRATE 1
#include <iostream>
#include <iostream>
...
...
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