vlc/vlc-1.1 | branch: master | Rui Zhang <bbcal...@gmail.com> | Thu Jul 12 19:59:25 2012 +0800| [0b1cd3370b578fae5d828bd406d28683b7919b0e] | committer: Jean-Baptiste Kempf
avformat: avoid EOF if av_read_frame returns AVERROR(EAGAIN) Signed-off-by: Jean-Baptiste Kempf <j...@videolan.org> (cherry picked from commit 352ea7df94b18869277457c79e7d5c10f388f075) Signed-off-by: Jean-Baptiste Kempf <j...@videolan.org> In fact, it closes #7145 (cherry picked from commit 74632021986be07f4afe48347167b84f60b04d5b) Signed-off-by: Jean-Baptiste Kempf <j...@videolan.org> > http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=0b1cd3370b578fae5d828bd406d28683b7919b0e --- modules/demux/avformat/demux.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c index bd7c166..ecbe7e8 100644 --- a/modules/demux/avformat/demux.c +++ b/modules/demux/avformat/demux.c @@ -536,8 +536,13 @@ static int Demux( demux_t *p_demux ) int64_t i_start_time; /* Read a frame */ - if( av_read_frame( p_sys->ic, &pkt ) ) + int i_av_ret = av_read_frame( p_sys->ic, &pkt ); + if( i_av_ret ) { + /* Avoid EOF if av_read_frame returns AVERROR(EAGAIN) */ + if( i_av_ret == AVERROR(EAGAIN) ) + return 1; + return 0; } if( pkt.stream_index < 0 || pkt.stream_index >= p_sys->i_tk ) _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org http://mailman.videolan.org/listinfo/vlc-commits