Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
8e1ac66f
Commit
8e1ac66f
authored
Feb 02, 2006
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix download (it didn't download the last (file size)%(1<<10) bytes)
parent
e47b26fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
src/misc/update.c
src/misc/update.c
+13
-8
No files found.
src/misc/update.c
View file @
8e1ac66f
...
@@ -1240,6 +1240,11 @@ void update_download_for_real( download_thread_t *p_this )
...
@@ -1240,6 +1240,11 @@ void update_download_for_real( download_thread_t *p_this )
vlc_thread_ready
(
p_this
);
vlc_thread_ready
(
p_this
);
asprintf
(
&
psz_status
,
"%s
\n
Downloading... %.1f%% done"
,
p_this
->
psz_status
,
0
.
0
);
i_progress
=
intf_UserProgress
(
p_vlc
,
"Downloading..."
,
psz_status
,
0
.
0
);
p_stream
=
stream_UrlNew
(
p_vlc
,
psz_src
);
p_stream
=
stream_UrlNew
(
p_vlc
,
psz_src
);
if
(
!
p_stream
)
if
(
!
p_stream
)
{
{
...
@@ -1255,20 +1260,16 @@ void update_download_for_real( download_thread_t *p_this )
...
@@ -1255,20 +1260,16 @@ void update_download_for_real( download_thread_t *p_this )
}
}
else
else
{
{
int
i_read
;
i_size
=
(
int
)(
stream_Size
(
p_stream
)
/
(
1
<<
10
));
i_size
=
(
int
)(
stream_Size
(
p_stream
)
/
(
1
<<
10
));
p_buffer
=
(
void
*
)
malloc
(
1
<<
10
);
p_buffer
=
(
void
*
)
malloc
(
1
<<
10
);
asprintf
(
&
psz_status
,
"%s
\n
Downloading... %.1f%% done"
,
while
(
(
i_read
=
stream_Read
(
p_stream
,
p_buffer
,
1
<<
10
)
)
)
p_this
->
psz_status
,
0
.
0
);
i_progress
=
intf_UserProgress
(
p_vlc
,
"Downloading..."
,
psz_status
,
0
.
0
);
while
(
stream_Read
(
p_stream
,
p_buffer
,
1
<<
10
)
)
{
{
float
f_progress
;
float
f_progress
;
fwrite
(
p_buffer
,
1
<<
10
,
1
,
p_file
);
fwrite
(
p_buffer
,
i_read
,
1
,
p_file
);
i_done
++
;
i_done
++
;
free
(
psz_status
);
free
(
psz_status
);
...
@@ -1280,10 +1281,14 @@ void update_download_for_real( download_thread_t *p_this )
...
@@ -1280,10 +1281,14 @@ void update_download_for_real( download_thread_t *p_this )
}
}
free
(
p_buffer
);
free
(
p_buffer
);
free
(
psz_status
);
fclose
(
p_file
);
fclose
(
p_file
);
stream_Delete
(
p_stream
);
stream_Delete
(
p_stream
);
free
(
psz_status
);
asprintf
(
&
psz_status
,
"%s
\n
Done (100.00%%)"
,
p_this
->
psz_status
);
intf_UserProgressUpdate
(
p_vlc
,
i_progress
,
psz_status
,
100
.
0
);
free
(
psz_status
);
}
}
}
}
...
...
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