summaryrefslogtreecommitdiff
path: root/libavformat/aviobuf.c
Commit message (Collapse)AuthorAge
* mp3dec: decode more data from Info headerAlessandro Ghedini2014-04-17
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* aviobuf: Handle a NULL buffer in avio_close_dyn_bufMartin Storsjö2013-11-01
| | | | | | | | | | | | This simplifies proper error handling in rtsp.c/rtspdec.c. When broadcasting over RTSP in TCP mode, the AVIOContext is closed and recreated for each sent packet, and if the recreation fails, we might try to close a NULL buffer when freeing things at the end. Previously, if recreating the buffer in rtspdec.c failed, this would crash later due to trying to close a NULL buffer. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: Reset the entry count and allocation size variables on av_reallocp ↵Martin Storsjö2013-09-26
| | | | | | | | | | | | | | failures 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>
* aviobuf: Add functions for null buffersMartin Storsjö2013-09-19
| | | | | | | Null buffers are useful for simulating writing to a real buffer for the sake of measuring how many bytes are written. Signed-off-by: Martin Storsjö <martin@martin.st>
* avformat: Use av_reallocp() where suitableAlexandra Khirnova2013-09-18
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* avio: Add const qualifiers to ffio_read_indirectBen Avison2013-08-08
| | | | | | | This provides at least some protection against potential accidental corruption of AVIO buffer workspace. Signed-off-by: Martin Storsjö <martin@martin.st>
* avio: Add an internal function for reading without copyingBen Avison2013-08-05
| | | | | | | | As long as there is enough contiguous data in the avio buffer, just return a pointer to it instead of copying it to the caller provided buffer. Signed-off-by: Martin Storsjö <martin@martin.st>
* avio: Don't set the seekable flag if no seek function is providedHendrik Schreiber2013-07-26
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* aviobuf: Discard old buffered, previously read data in ffio_read_partialMartin Storsjö2013-01-03
| | | | | | | This makes RTP custom IO work properly with pure read-only AVIOContexts as well. Signed-off-by: Martin Storsjö <martin@martin.st>
* aviobuf: Partial support for reading in read/write contextsMartin Storsjö2013-01-03
| | | | | | | | | | | | | | | | So far, aviocontexts are used either in pure-read or pure-write mode - full read/write mode doesn't work well (and implementing it is a much larger, not totally trivial change). This patch allows using avio_read and ffio_read_partial on read/write aviocontexts, where the read operations are passed through directly unbuffered, while writes are buffered as usual. This is enough to support the operations needed by packet based data transfer like in udp/rtp, where aviocontext is the only public API for hooking up custom IO. Signed-off-by: Martin Storsjö <martin@martin.st>
* miscellaneous typo fixesDiego Biurrun2012-12-21
|
* avio: K&R cosmetic formattingLuca Barbato2012-12-09
|
* aviobuf: Remove a senseless ifdef in avio_seekMartin Storsjö2012-10-18
| | | | | | | | | This seemed to assume that one never used writing avio unless muxers or networking was enabled. This ifdef is a remnant since 8fa641f8. Signed-off-by: Martin Storsjö <martin@martin.st>
* avio: introduce avio_closepLuca Barbato2012-10-10
|
* avio: flush the internal buffer in avio_close()Stefano Sabatini2012-09-15
| | | | | This is consistent with stdio, and thus what people would naturally expect.
* avio: make avio_close NULL the freed bufferLuca Barbato2012-09-04
|
* avio: make avio_close(NULL) a no-opLuca Barbato2012-04-27
| | | | Its behaviour in line with ffurl_close(NULL).
* lavf: remove disabled FF_API_OLD_AVIO cruftAnton Khirnov2012-01-27
|
* cosmetics: drop some pointless parenthesesDiego Biurrun2012-01-07
|
* avio: exit early in fill_buffer without read_packetJanne Grunau2012-01-04
| | | | | | | 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.
* avio: add avio_open2, taking an interrupt callback and optionsMartin Storsjö2011-11-13
| | | | | | | | | | | 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>
* avio: add support for passing options to protocols.Anton Khirnov2011-11-13
| | | | | Not used anywhere yet, support for passing options from avio_open() will follow.
* avio: Add an AVIOInterruptCB parameter to ffurl_open/ffurl_allocMartin Storsjö2011-11-13
| | | | | Change all uses of these function to pass the relevant callback on.
* Remove some stray unnecessary ffmpeg references.Diego Biurrun2011-11-02
|
* avio: Check for invalid buffer length.Alex Converse2011-10-16
|
* avio: don't replicate avio_alloc_context functionality.Anton Khirnov2011-07-15
|
* avio: check AVIOContext malloc failureCan Wu2011-05-21
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbolsStefano Sabatini2011-04-19
| | | | | | | | 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.
* lavf: remove FF_API_URL_RESETBUF cruftAnton Khirnov2011-04-19
|
* avio: undeprecate av_url_read_fseek/fpause under nicer namesAnton Khirnov2011-04-12
| | | | It seems their replacements won't be ready anytime soon.
* avio: AVIO_ prefixes for URL_ open flags.Anton Khirnov2011-04-07
|
* avio: always compile dyn_buf functionsAnton Khirnov2011-04-05
| | | | | | Fixes build with --disable-muxers --disable-network. Thanks to Hendrik Leppkes for noticing.
* avio: deprecate url_max_packet_size().Anton Khirnov2011-04-04
| | | | URLContext.max_packet_size should be used directly.
* avio: make url_close() internal.Anton Khirnov2011-04-04
|
* avio: make url_seek() internal.Anton Khirnov2011-04-04
|
* avio: make url_write() internal.Anton Khirnov2011-04-04
|
* avio: make url_read() internal.Anton Khirnov2011-04-04
|
* avio: make url_open() internal.Anton Khirnov2011-04-04
|
* avio: simplify url_open_dyn_buf_internal by using avio_alloc_context()Anton Khirnov2011-04-03
|
* avio: make url_fdopen internal.Anton Khirnov2011-04-03
| | | | | The unbuffered URLContext API will be made private, so there's no point in this function being public.
* avio: make url_open_dyn_packet_buf internal.Anton Khirnov2011-04-03
| | | | | | | 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.
* avio: avio_ prefix for url_close_dyn_bufAnton Khirnov2011-04-03
|
* avio: avio_ prefix for url_open_dyn_bufAnton Khirnov2011-04-03
|
* avio: introduce an AVIOContext.seekable fieldAnton Khirnov2011-04-03
| | | | Use it instead of url_is_streamed and AVIOContext.is_streamed.
* avio: make get_checksum() internal.Anton Khirnov2011-03-30
|
* avio: make init_checksum() internal.Anton Khirnov2011-03-30
|
* avio: make av_url_read_fseek/fpause internal.Anton Khirnov2011-03-21
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: deprecate url_filenoAnton Khirnov2011-03-20
| | | | | | | | 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>
* Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* avio: rename put_flush_packet -> avio_flushAnton Khirnov2011-03-16
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>