2015-04-10 22:04 GMT+08:00 wm4 <nfx...@googlemail.com>: > On Fri, 10 Apr 2015 21:17:42 +0800 > Zhang Rui <bbcal...@gmail.com> wrote: >> >> This kind of error handling need some more work in aviobuf.c, >> and more advises from ffmpeg developers. >> And i prefer this way than the patch I posted. > > stdio.h does it this way: FILE has an error flag that is set when > something goes wrong.
AVIOContext has an error field, too. But I don't think it's enough for EAGAIN situation without some convention. At least, ffplay doesn't show that. >> > Also, why doesn't avio_skip() return an error if the skip count is not >> > 0 and the stream has reached EOF? >> >> The eof handling is quite confusing in ffplay for me. AVERROR_EOF is >> clear enough. > > Well, I have no idea what avio_skip() even returns... it just calls > avio_seek(), which is a goddamn fucked up mess thanks to years of > people adding hacks. Is there any correct direction to fix it? > ffplay probably does it wrong. Wouldn't be surprising. It checks > avio_feof() after a av_read_frame() call, which doesn't look correct. > File EOF has absolutely nothing to do with whether a demuxer still has > data. > > On a side note, I'm not sure whether av_read_frame() returning > AVERROR_EOF is an error at all, or just signals that the end of the > file was reached. The doxygen on this function isn't helpful either. Is there any ideas, or any helpful keywords or threads in mail list archive? _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel