mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-30 03:32:36 +00:00
c5cdb0c277
openmw with ffmpeg 5 would hang in an infinite loop trying to read at end of files in avformat_open_input() avio_read() apparently now no longer handlers 0 as a return value to signal EOF and we need ot explicitly return AVERROR_EOF; their documentation explicitely states "For stream protocols, must never return 0 but rather a proper AVERROR code." for avio_alloc_context's read_context. Also fix the exception case to return AVERROR_UNKNOWN -- I assume we'd otherwise get stuck there too, but I don't know what would trigger this case. Fixes #6631