[vlc-commits] [Git][videolan/vlc][3.0.x] demux: avformat: fix IORead EOF value

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Thu Feb 17 07:15:45 UTC 2022



Jean-Baptiste Kempf pushed to branch 3.0.x at VideoLAN / VLC


Commits:
08b36ec7 by Francois Cartegnie at 2022-02-17T06:55:51+00:00
demux: avformat: fix IORead EOF value

(cherry picked from commit b7c97da03be864d20713054d52eddfb9d93773bb)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

- - - - -


1 changed file:

- modules/demux/avformat/demux.c


Changes:

=====================================
modules/demux/avformat/demux.c
=====================================
@@ -1192,9 +1192,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 )



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/08b36ec7e38ace0c7e198f34273e15858450473a

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/08b36ec7e38ace0c7e198f34273e15858450473a
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list