diff options
author | Jörg Müller <nexyon@gmail.com> | 2022-08-02 21:17:46 +0300 |
---|---|---|
committer | Jörg Müller <nexyon@gmail.com> | 2022-08-02 21:17:46 +0300 |
commit | e4fd2d57543a86c4879537939ecf9c4fad68eeac (patch) | |
tree | 6cd403eeb32c1405ffd9d15b9f679bf83b4799a7 | |
parent | 5ddaf2fa7b878e8c6299033e9f9392a0a174dde5 (diff) |
Fix T99812: Audio scrubbing freezes Blender 3.2.1
Bug was caused by a change in ffmpeg's API.
-rw-r--r-- | extern/audaspace/plugins/ffmpeg/FFMPEGReader.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/extern/audaspace/plugins/ffmpeg/FFMPEGReader.cpp b/extern/audaspace/plugins/ffmpeg/FFMPEGReader.cpp index ad33c267c74..5035ed05be5 100644 --- a/extern/audaspace/plugins/ffmpeg/FFMPEGReader.cpp +++ b/extern/audaspace/plugins/ffmpeg/FFMPEGReader.cpp @@ -363,8 +363,8 @@ int FFMPEGReader::read_packet(void* opaque, uint8_t* buf, int buf_size) long long size = std::min(static_cast<long long>(buf_size), reader->m_membuffer->getSize() - reader->m_membufferpos); - if(size < 0) - return -1; + if(size <= 0) + return AVERROR_EOF; std::memcpy(buf, ((data_t*)reader->m_membuffer->getBuffer()) + reader->m_membufferpos, size); reader->m_membufferpos += size; |