Diego Biurrun
3dc99a18d4
cosmetics: drop some pointless parentheses
13 years ago
Janne Grunau
a2d1d21629
avio: exit early in fill_buffer without read_packet
...
Fixes an invalid free() with ass in avi. The sample in bug 98 passes
parts of AVPacket.data as buffer for the AVIOContext. Since the packet
is quite large fill_buffer tries to reallocate the buffer before doing
nothing. Fixes bug 98.
13 years ago
Martin Storsjö
1dee0aca74
avio: add avio_open2, taking an interrupt callback and options
...
The interrupt callback has to be passed in during opening (setting it
after opening isn't enough), since a blocking open couldn't be
interrupted otherwise.
Options are passed down to procotols and also need to be available
during open() in most cases.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Anton Khirnov
ddffc2fdc3
avio: add support for passing options to protocols.
...
Not used anywhere yet, support for passing options from avio_open() will
follow.
13 years ago
Martin Storsjö
6f1b7b3944
avio: Add an AVIOInterruptCB parameter to ffurl_open/ffurl_alloc
...
Change all uses of these function to pass the relevant
callback on.
13 years ago
Diego Biurrun
124e28847b
Remove some stray unnecessary ffmpeg references.
13 years ago
Alex Converse
ab2940691b
avio: Check for invalid buffer length.
13 years ago
Anton Khirnov
c3bec4cd13
avio: don't replicate avio_alloc_context functionality.
14 years ago
Can Wu
9e2dabed4a
avio: check AVIOContext malloc failure
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Stefano Sabatini
59d96941f0
avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbols
...
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.
14 years ago
Anton Khirnov
468644f6c1
lavf: remove FF_API_URL_RESETBUF cruft
14 years ago
Anton Khirnov
ff1ec0c3f8
avio: undeprecate av_url_read_fseek/fpause under nicer names
...
It seems their replacements won't be ready anytime soon.
14 years ago
Anton Khirnov
f87b1b373a
avio: AVIO_ prefixes for URL_ open flags.
14 years ago
Anton Khirnov
668438a31e
avio: always compile dyn_buf functions
...
Fixes build with --disable-muxers --disable-network.
Thanks to Hendrik Leppkes for noticing.
14 years ago
Anton Khirnov
5958df341d
avio: deprecate url_max_packet_size().
...
URLContext.max_packet_size should be used directly.
14 years ago
Anton Khirnov
e52a9145c8
avio: make url_close() internal.
14 years ago
Anton Khirnov
58a48c6511
avio: make url_seek() internal.
14 years ago
Anton Khirnov
925e908bc7
avio: make url_write() internal.
14 years ago
Anton Khirnov
bc371aca46
avio: make url_read() internal.
14 years ago
Anton Khirnov
0589da0aa5
avio: make url_open() internal.
14 years ago
Anton Khirnov
8bea72f7eb
avio: simplify url_open_dyn_buf_internal by using avio_alloc_context()
14 years ago
Anton Khirnov
724f6a0fa4
avio: make url_fdopen internal.
...
The unbuffered URLContext API will be made private, so there's no point
in this function being public.
14 years ago
Anton Khirnov
403ee835e7
avio: make url_open_dyn_packet_buf internal.
...
It doesn't look fit to be a part of the public API.
Adding a temporary hack to ffserver to be able to use it, should be
cleaned up when somebody is up for it.
14 years ago
Anton Khirnov
6dc7d80de7
avio: avio_ prefix for url_close_dyn_buf
14 years ago
Anton Khirnov
b92c545282
avio: avio_ prefix for url_open_dyn_buf
14 years ago
Anton Khirnov
8978fedaee
avio: introduce an AVIOContext.seekable field
...
Use it instead of url_is_streamed and AVIOContext.is_streamed.
14 years ago
Anton Khirnov
b64030f26d
avio: make get_checksum() internal.
14 years ago
Anton Khirnov
4c4427a75d
avio: make init_checksum() internal.
14 years ago
Anton Khirnov
933e90a69a
avio: make av_url_read_fseek/fpause internal.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
8d9769a77b
avio: deprecate url_fileno
...
It's an evil hack that assumes an AVIOContext is always based on top of
an URLContext.
It's also not used anywhere.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Anton Khirnov
b7f2fdde74
avio: rename put_flush_packet -> avio_flush
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
35f1023592
avio: deprecate url_close_buf
...
It's not used anywhere and its return value looks broken.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
83fddaeb81
avio: deprecate url_open_buf
...
It's only used in one place and does the same thing as
avio_alloc_context.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
eda4cf92d7
avio: always compile avio_printf, rather than on CONFIG_MUXERS
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
d9d86e00b2
avio: avio_ prefix for url_fprintf
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
59f65d9579
avio: make url_setbufsize internal.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
4839c192de
lavf: move ff_get_v from avio.h to avio_internal.h
...
And rename it to ffio_read_varlen.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
3e68b3ba7b
avio: deprecate url_ferror
...
AVIOContext.error should be used directly instead.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
66e5b1df36
avio: deprecate url_feof
...
AVIOContext.eof_reached should be used directly instead.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
f1ef2cd9ed
avio: move ff_rewind_with_probe_data from avio.h to avio_internal.h
...
also change its prefix to ffio
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
e8bb2e2439
avio: deprecate url_fget_max_packet_size
...
AVIOContext.max_packet_size should be used directly instead.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
76aa876e69
avio: avio_ prefix for url_fsize
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
e51975392d
avio: deprecate url_fgetc and remove all it uses
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
655e45e7df
avio: deprecate url_fgets
...
It's not used anywhere and doesn't look ver useful to be public.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
a2704c9712
avio: add avio_tell macro as a replacement for url_ftell
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
e16ead0716
lavf: deprecate get_strz() in favor of avio_get_str
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Reimar Döffinger
41d8555f72
avio: add avio_get_str()
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Martin Storsjö
e360ada2d1
aviobuf: Write new data at s->buf_end in fill_buffer
...
In most cases, s->buf_ptr will be equal to s->buf_end when
fill_buffer is called, but this may not always be the case, if
we're seeking forward by reading (permitted by the short seek
threshold).
If fill_buffer is writing to s->buf_ptr instead of s->buf_end (when
they aren't equal and s->buf_ptr is ahead of s->buffer), the data
between s->buf_ptr and s->buf_end is overwritten, leading to
inconsistent buffer content. This could return incorrect data if
later seeking back into the area before the current s->buf_ptr.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
14 years ago
Anton Khirnov
0300db8ad7
avio: deprecate url_fskip
...
avio_seek should be used instead
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago