[vlc-devel] commit: avformat: do away with strang stream_Tell >= stream_Size check. ( Derk-Jan Hartman )

Rémi Denis-Courmont rem at videolan.org
Wed Jul 30 16:05:41 CEST 2008


On Wednesday 30 July 2008 13:29:04 Derk-Jan Hartman, you wrote:
> > Hmm, what if the file size changes dynamically? (yes, this *can*
> > happen)
>
> Then that still isn't the EOF for the file is it ? At most, it means
> the stream_Size we had been using is no longer valid at that point,
> but the Seek should be no problem (and will still return -1 if it does
> seek past the end). I'm not so sure how well avformat supports files
> that change size, but I don't think we should set EOF for this case.

On many (most? all?) operating systems, seek() is not a reliable operation, 
that is to say, it might return success (0), _then_ fail, and the process 
will be notified of an error only at the next read() or write().

-- 
Rémi Denis-Courmont



More information about the vlc-devel mailing list