[vlc-commits] demux: avformat: fix IORead EOF value
Francois Cartegnie
git at videolan.org
Mon Mar 15 20:56:33 UTC 2021
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Mar 11 20:22:40 2021 +0100| [b7c97da03be864d20713054d52eddfb9d93773bb] | committer: Francois Cartegnie
demux: avformat: fix IORead EOF value
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b7c97da03be864d20713054d52eddfb9d93773bb
---
modules/demux/avformat/demux.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c
index 68d2a01cca..e3705005c9 100644
--- a/modules/demux/avformat/demux.c
+++ b/modules/demux/avformat/demux.c
@@ -1290,9 +1290,9 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
static int IORead( void *opaque, uint8_t *buf, int buf_size )
{
demux_t *p_demux = opaque;
- if( buf_size < 0 ) return -1;
+ if( buf_size < 0 ) return AVERROR_EOF;
int i_ret = vlc_stream_Read( p_demux->s, buf, buf_size );
- return i_ret >= 0 ? i_ret : -1;
+ return i_ret > 0 ? i_ret : AVERROR_EOF;
}
static int64_t IOSeek( void *opaque, int64_t offset, int whence )
More information about the vlc-commits
mailing list