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;
8 stream.read((char*)buf, buf_size);
9 - return stream.gcount();
10 + std::streamsize count = stream.gcount();
15 catch (std::exception& )
18 + return AVERROR_UNKNOWN;