On 02/28/2016 12:59 PM, Reimar Döffinger wrote:
On Sun, Feb 28, 2016 at 12:33:16PM +0100, Mats Peterson wrote:
On 02/28/2016 12:26 PM, Mats Peterson wrote:
On 02/28/2016 12:16 PM, Reimar Döffinger wrote:
Well, the documentation says that avio_seek() is a variant of the
fseek() function. I would rather say it's a variant of lseek(), since it
returns the new position, not just 0 or -1. In any case, this is what
the lseek() man page says:
"On error, the value (off_t) -1 is returned and errno is set to
indicate the error."
So it's not really undefined.
Even if the return value is not undefined on error from an avio_seek(),
would you prefer using pb->seekable instead of invoking an avio_seek()
function that will fail? Is it more elegant to you?
I never said the return value was undefined, I said its
behaviour (i.e. what it did to your stream) is undefined.
E.g. it might have seeked back by the size of cached data
instead of to the place you wanted.
That's why checking pb->seekable is the only way fairly
sure to not produce incorrect results.
_______________________________________________
Alright. Sorry. Fixed in v4 1/2 v2 that I just posted. Have a look at it.
Mats
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel