[FFmpeg-cvslog] r13061 - trunk/libavformat/avio.c

michael subversion
Mon May 5 11:17:57 CEST 2008


Author: michael
Date: Mon May  5 11:17:56 2008
New Revision: 13061

Log:
Check url_seek() in url_open().


Modified:
   trunk/libavformat/avio.c

Modified: trunk/libavformat/avio.c
==============================================================================
--- trunk/libavformat/avio.c	(original)
+++ trunk/libavformat/avio.c	Mon May  5 11:17:56 2008
@@ -113,6 +113,12 @@ int url_open(URLContext **puc, const cha
         *puc = NULL;
         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;
     return 0;
  fail:




More information about the ffmpeg-cvslog mailing list