[MPlayer-cvslog] r38006 - trunk/libmpdemux/demux_lavf.c

al subversion at mplayerhq.hu
Fri Nov 17 00:48:59 EET 2017


Author: al
Date: Fri Nov 17 00:48:59 2017
New Revision: 38006

Log:
demux lavf: mp_read: Propagate EOF

Return AVERROR_EOF from mp_read callback, if stream->eof is non-zero.

Fixes ticket #2335

Modified:
   trunk/libmpdemux/demux_lavf.c

Modified: trunk/libmpdemux/demux_lavf.c
==============================================================================
--- trunk/libmpdemux/demux_lavf.c	Tue Nov 14 23:56:09 2017	(r38005)
+++ trunk/libmpdemux/demux_lavf.c	Fri Nov 17 00:48:59 2017	(r38006)
@@ -90,6 +90,8 @@ static int mp_read(void *opaque, uint8_t
     int ret;
 
     ret=stream_read(stream, buf, size);
+    if (!ret && stream->eof)
+      ret = AVERROR_EOF;
 
     mp_msg(MSGT_HEADER,MSGL_DBG2,"%d=mp_read(%p, %p, %d), pos: %"PRId64", eof:%d\n",
            ret, stream, buf, size, stream_tell(stream), stream->eof);


More information about the MPlayer-cvslog mailing list