Since all URLContexts have the same AVOptions, such AVOptions
will be applied on the outermost context only and removed from the
dict, while they probably make sense on all contexts.
This makes sure that rw_timeout gets propagated to the innermost
URLContext (to make sure it gets passed to the tcp protocol, when
opening a http connection for instance).
Alternatively, such matching options would be kept in the dict
and only removed after the ffurl_connect call.
Signed-off-by: Martin Storsjö <martin@martin.st>
Instead of a linked list constructed at av_register_all(), store them
in a constant array of pointers.
Since no registration is necessary now, this removes some global state
from lavf. This will also allow the urlprotocol layer caller to limit
the available protocols in a simple and flexible way in the following
commits.
When av_reallocp fails, the associated variables that keep track of
the number of elements in the array (and in some cases, the
separate number of allocated elements) need to be reset.
Not all of these might technically be needed, but it's better to
reset them if in doubt, to make sure variables don't end up
conflicting.
Signed-off-by: Martin Storsjö <martin@martin.st>
This definition is in two files, since the definitions will move
to the private header at the next bump.
Signed-off-by: Martin Storsjö <martin@martin.st>
This simplifies the open functions by avoiding one function
call that needs error checking, reducing the amount of
extra bulk code.
Signed-off-by: Martin Storsjö <martin@martin.st>
Make AVIO_FLAG_ access constants work as flags, and in particular fix
the behavior of functions (such as avio_check()) which expect them to
be flags rather than modes.
This breaks API.
init_put_byte should never be used outside of lavf, since
sizeof(AVIOContext) isn't part of public ABI.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
prevents a read-after-close-induced segfault later. Fixes issue 2266.
Patch by qrtt1 <chingyichan dot tw gmail com>.
Originally committed as revision 25349 to svn://svn.ffmpeg.org/ffmpeg/trunk
MMSContext. The other MMST-specific members go into MMSTContext.
Patch by Zhentan Feng <spyfeng gmail com>.
Originally committed as revision 24778 to svn://svn.ffmpeg.org/ffmpeg/trunk
should help in making mmst a little more userfriendly, or at least debuggable.
Also use helpful error return values instead of -1.
Originally committed as revision 24515 to svn://svn.ffmpeg.org/ffmpeg/trunk
servers happen to do. For this, we also move several header-size-related
variables to the MMSTContext.
Patch by Zhentan Feng <spyfeng gmail com>.
Originally committed as revision 24363 to svn://svn.ffmpeg.org/ffmpeg/trunk
part of the spec and causes problems otherwise.
Patch by Zhentan Feng <spyfeng gmail com>.
Originally committed as revision 24362 to svn://svn.ffmpeg.org/ffmpeg/trunk
most servers. Also remove a case where we manually aligned to 8 bytes,
since this is now no longer needed.
Patch by Zhentan Feng <spyfeng gmail com>.
Originally committed as revision 24360 to svn://svn.ffmpeg.org/ffmpeg/trunk
format ‘%d’ expects type ‘int’, but argument 3 has type ‘uint64_t’
Patch by Zhentan Feng <spyfeng gmail com>.
Originally committed as revision 24359 to svn://svn.ffmpeg.org/ffmpeg/trunk