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
1 changed files with 1 additions and 1 deletions

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)