diff options
author | Jörg Müller <nexyon@gmail.com> | 2022-08-02 21:17:46 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-08-05 20:40:39 +0300 |
commit | 4181d82ad1e3cbe9f3774e6c60767e1915201548 (patch) | |
tree | c453167868f3747ecbfb6e9152ff5798caa4d971 | |
parent | 18b703dc050b75b7f12d89dc2ad1dfdd2871c65e (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; |