0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

demux_lavf: return AVERROR_EOF on file end

Signed-off-by: Daniel Kucera <daniel.kucera@gmail.com>
Signed-off-by: wm4 <wm4@nowhere>

Uses different style and different logic from original PR.
This commit is contained in:
Daniel Kucera 2017-10-23 15:29:17 +02:00 committed by wm4
parent 6b745769b1
commit e9dc4ac86f

View File

@ -242,7 +242,7 @@ static int mp_read(void *opaque, uint8_t *buf, int size)
MP_TRACE(demuxer, "%d=mp_read(%p, %p, %d), pos: %"PRId64", eof:%d\n",
ret, stream, buf, size, stream_tell(stream), stream->eof);
return ret;
return ret ? ret : AVERROR_EOF;
}
static int64_t mp_seek(void *opaque, int64_t pos, int whence)