[FFmpeg-devel] [PATCH] Do not call lseek() with whence==AVSEEK_SIZE

Michael Niedermayer michaelni
Sat Feb 13 17:37:13 CET 2010


On Sat, Feb 13, 2010 at 04:24:11PM +0000, M?ns Rullg?rd wrote:
> Michael Niedermayer <michaelni at gmx.at> writes:
> 
> > On Sat, Feb 13, 2010 at 03:12:38PM +0000, Mans Rullgard wrote:
> >> ---
> >>  libavformat/file.c |    2 ++
> >>  1 files changed, 2 insertions(+), 0 deletions(-)
> >> 
> >> diff --git a/libavformat/file.c b/libavformat/file.c
> >> index d2cb530..2c14bb0 100644
> >> --- a/libavformat/file.c
> >> +++ b/libavformat/file.c
> >> @@ -73,6 +73,8 @@ static int file_write(URLContext *h, unsigned char *buf, int size)
> >>  static int64_t file_seek(URLContext *h, int64_t pos, int whence)
> >>  {
> >>      int fd = (intptr_t) h->priv_data;
> >> +    if (whence == AVSEEK_SIZE)
> >> +        return -1;
> >
> > ok with  ENOTSUP
> 
> Seeing avcoder's reply, maybe it would be better to check that whence
> is one of the three standard values and reject everything else instead.

yes, of course

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100213/bb56991f/attachment.pgp>



More information about the ffmpeg-devel mailing list