archrelease: copy trunk to community-any
[ArchLinux/community.git] / openmw / trunk / 1941.patch
blobcd5e6c7e53d6e7109f3c7dd50c7a96b95f2d187c
1 diff --git a/apps/openmw/mwsound/ffmpeg_decoder.cpp b/apps/openmw/mwsound/ffmpeg_decoder.cpp
2 index 0a9641635f..997b4e30c6 100644
3 --- a/apps/openmw/mwsound/ffmpeg_decoder.cpp
4 +++ b/apps/openmw/mwsound/ffmpeg_decoder.cpp
5 @@ -18,11 +18,14 @@ int FFmpeg_Decoder::readPacket(void *user_data, uint8_t *buf, int buf_size)
6 std::istream& stream = *static_cast<FFmpeg_Decoder*>(user_data)->mDataStream;
7 stream.clear();
8 stream.read((char*)buf, buf_size);
9 - return stream.gcount();
10 + std::streamsize count = stream.gcount();
11 + if (count == 0)
12 + return AVERROR_EOF;
13 + return count;
15 catch (std::exception& )
17 - return 0;
18 + return AVERROR_UNKNOWN;
22 --
23 GitLab