diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-05-17 16:02:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-17 16:02:12 +0200 |
commit | b0a51bf9fe6b35cf4e2a76ec067d76349ca9b75c (patch) | |
tree | 905b5c483a9dab81bc19fbfe9893e17f02506720 /modules/theora/video_stream_theora.cpp | |
parent | 45e0f9fd523cb861b8e432966577d7c4608564ad (diff) | |
parent | 469fa47e0646d8f2ca3237dede8a04568039c7c6 (diff) |
Merge pull request #48768 from akien-mga/file-access-64-bit-4.0
Make all file access 64-bit (`uint64_t`)
Diffstat (limited to 'modules/theora/video_stream_theora.cpp')
-rw-r--r-- | modules/theora/video_stream_theora.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp index 54f5b3f424..7b421bdc16 100644 --- a/modules/theora/video_stream_theora.cpp +++ b/modules/theora/video_stream_theora.cpp @@ -58,7 +58,7 @@ int VideoStreamPlaybackTheora::buffer_data() { #else - int bytes = file->get_buffer((uint8_t *)buffer, 4096); + uint64_t bytes = file->get_buffer((uint8_t *)buffer, 4096); ogg_sync_wrote(&oy, bytes); return (bytes); @@ -176,7 +176,7 @@ void VideoStreamPlaybackTheora::set_file(const String &p_file) { thread_eof = false; //pre-fill buffer int to_read = ring_buffer.space_left(); - int read = file->get_buffer(read_buffer.ptr(), to_read); + uint64_t read = file->get_buffer(read_buffer.ptr(), to_read); ring_buffer.write(read_buffer.ptr(), read); thread.start(_streaming_thread, this); @@ -632,8 +632,8 @@ void VideoStreamPlaybackTheora::_streaming_thread(void *ud) { //just fill back the buffer if (!vs->thread_eof) { int to_read = vs->ring_buffer.space_left(); - if (to_read) { - int read = vs->file->get_buffer(vs->read_buffer.ptr(), to_read); + if (to_read > 0) { + uint64_t read = vs->file->get_buffer(vs->read_buffer.ptr(), to_read); vs->ring_buffer.write(vs->read_buffer.ptr(), read); vs->thread_eof = vs->file->eof_reached(); } |