Browse Source

Check url_seek() in url_open().

Originally committed as revision 13061 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Michael Niedermayer 17 years ago
parent
commit
abbae514e1
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      libavformat/avio.c

+ 6
- 0
libavformat/avio.c View File

@@ -113,6 +113,12 @@ int url_open(URLContext **puc, const char *filename, int flags)
*puc = NULL; *puc = NULL;
return err; return err;
} }

//We must be carefull here as url_seek() could be slow, for example for http
if( (flags & (URL_WRONLY | URL_RDWR))
|| !strcmp(proto_str, "file"))
if(!uc->is_streamed && url_seek(uc, 0, SEEK_SET) < 0)
uc->is_streamed= 1;
*puc = uc; *puc = uc;
return 0; return 0;
fail: fail:


Loading…
Cancel
Save