* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+
+#include "libavutil/avstring.h"
+#include "libavcodec/opt.h"
#include "avformat.h"
-#include "avstring.h"
-#include "opt.h"
#if LIBAVFORMAT_VERSION_MAJOR >= 53
/** @name Logging context. */
*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: