summaryrefslogtreecommitdiff
path: root/libavformat/aviobuf.c
Commit message (Collapse)AuthorAge
* Merge commit '32d05934abc7427bb90380a4c1ab20a15fd7d821'Michael Niedermayer2014-04-18
|\ | | | | | | | | | | | | | | | | | | * commit '32d05934abc7427bb90380a4c1ab20a15fd7d821': mp3dec: decode more data from Info header Conflicts: libavformat/mp3dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mp3dec: decode more data from Info headerAlessandro Ghedini2014-04-17
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | libavformat/aviobuf: keep track of the original buffer-size and restore it ↵Michael Niedermayer2014-03-26
| | | | | | | | | | | | after probe/ensure-seekback Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/aviobuf: ffio_ensure_seekback: only copy the initialized part of ↵Michael Niedermayer2014-03-26
| | | | | | | | | | | | the buffer Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/aviobuf: optimize sequential backward seekingMichael Niedermayer2014-03-01
| | | | | | | | | | | | This reduces the number of protocol seeks Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/aviobuf: factorize buffer_size outMichael Niedermayer2014-03-01
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/aviobuf: fix null dereference in avio_close_dyn_buf()Michael Niedermayer2013-12-11
| | | | | | | | | | | | Fixes CID1135769 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/aviobuf: return error from avio_put_str16le() for invalid inputMichael Niedermayer2013-11-13
| | | | | | | | | | Found-by: Stefano Sabatini Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avio_put_str16le: Print error message in case of invalid UTF8 inputMichael Niedermayer2013-11-13
| | | | | | | | | | Found-by: Stefano Sabatini Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'd07b51bf0733fe58bbfa13c448775dc325463cb4'Michael Niedermayer2013-11-01
|\| | | | | | | | | | | | | * commit 'd07b51bf0733fe58bbfa13c448775dc325463cb4': aviobuf: Handle a NULL buffer in avio_close_dyn_buf Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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>
* | Merge commit 'd872fb0f7ff2ff0ba87f5ccf6a1a55ca2be472c9'Michael Niedermayer2013-09-27
|\| | | | | | | | | | | | | | | | | | | * commit 'd872fb0f7ff2ff0ba87f5ccf6a1a55ca2be472c9': lavf: Reset the entry count and allocation size variables on av_reallocp failures Conflicts: libavformat/avienc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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>
* | Merge commit '3627ce2f1dab1d33b7f99d78907a3e4d86b7d847'Michael Niedermayer2013-09-20
|\| | | | | | | | | | | | | * commit '3627ce2f1dab1d33b7f99d78907a3e4d86b7d847': aviobuf: Add functions for null buffers Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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>
* | Merge commit '5626f994f273af80fb100d4743b963304de9e05c'Michael Niedermayer2013-09-19
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '5626f994f273af80fb100d4743b963304de9e05c': avformat: Use av_reallocp() where suitable Conflicts: libavformat/avidec.c libavformat/avienc.c libavformat/aviobuf.c libavformat/oggparsevorbis.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Use av_reallocp() where suitableAlexandra Khirnova2013-09-18
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit '5afe1d27912be9b643ffb4ddc21f6d920260dbb0'Michael Niedermayer2013-08-08
|\| | | | | | | | | | | | | | | | | | | * commit '5afe1d27912be9b643ffb4ddc21f6d920260dbb0': avio: Add const qualifiers to ffio_read_indirect Conflicts: libavformat/mpegts.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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>
* | Merge commit 'daf1e0d3de03bd424016e2a7520e4e94ece5c0ac'Michael Niedermayer2013-08-06
|\| | | | | | | | | | | | | * commit 'daf1e0d3de03bd424016e2a7520e4e94ece5c0ac': avio: Add an internal function for reading without copying Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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>
* | avformat/aviobuf/ffio_init_context: set seekable automaticallyHendrik Schreiber2013-07-23
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/aviobuf: Add ffio_ensure_seekback()Michael Niedermayer2013-07-04
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat: Append data in fill_buffer() when possibleMichael Niedermayer2013-07-04
| | | | | | | | | | | | | | | | | | Data is appended in fill_buffer() when there is sufficient space left and the data pointer only reset when needed. Previously the data pointer was more often reset, loosing more seekback space than otherwise needed. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat: add writeout_count statisticMichael Niedermayer2013-04-08
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-01-04
|\| | | | | | | | | | | | | | | * qatar/master: lavr: fix missing " in header documentation aviobuf: Discard old buffered, previously read data in ffio_read_partial Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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>
* | Merge commit 'a0b7e289075dccf223b7f407790d8a86fc5d77e8'Michael Niedermayer2013-01-04
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'a0b7e289075dccf223b7f407790d8a86fc5d77e8': aviobuf: Partial support for reading in read/write contexts build: Avoid detecting bogus components named 'x' Conflicts: libavcodec/allcodecs.c libavdevice/alldevices.c libavformat/allformats.c libavformat/aviobuf.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-12-09
|\| | | | | | | | | | | | | | | | | | | * qatar/master: avio: K&R cosmetic formatting Conflicts: libavformat/aviobuf.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avio: K&R cosmetic formattingLuca Barbato2012-12-09
| |
* | avio: detect implicit truncation by assert in avio_w*Michael Niedermayer2012-10-24
| | | | | | | | | | | | | | This check is somewhat more lenient as would be ideal because we dont know if the input is signed or unsigned Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avio: avoid implicit truncation in avio_w*Michael Niedermayer2012-10-24
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'c0329748b04e1f175dad8c9c2ebf22a5e2dc5b72'Michael Niedermayer2012-10-19
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'c0329748b04e1f175dad8c9c2ebf22a5e2dc5b72': fate: add a dependency helper macro Add support for building shared libraries with MSVC avcodec: Rename avpriv_frame_rate_tab to ff_mpeg12_frame_rate_tab gxf: Add a local copy of the relevant parts of the frame rate table configure: Split out msvc as a separate target OS aviobuf: Remove a senseless ifdef in avio_seek Conflicts: configure libavcodec/dirac.c libavcodec/mpeg12data.h libavcodec/mpeg12enc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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: redesign ffio_rewind_with_probe_data()Michael Niedermayer2012-10-13
| | | | | | | | | | | | | | This prevents a double free Fixes CID718285 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'b522000e9b2ca36fe5b2751096b9a5f5ed8f87e6'Michael Niedermayer2012-10-11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'b522000e9b2ca36fe5b2751096b9a5f5ed8f87e6': avio: introduce avio_closep mpegtsenc: set muxing type notification to verbose vc1dec: Use correct spelling of "opposite" a64multienc: change mc_frame_counter to unsigned arm: call arm-specific rv34dsp init functions under if (ARCH_ARM) svq1: Drop a bunch of useless parentheses parseutils-test: do not print numerical error codes svq1: K&R formatting cosmetics Conflicts: doc/APIchanges libavcodec/svq1dec.c libavcodec/svq1enc.c libavformat/version.h libavutil/parseutils.c tests/ref/fate/parseutils Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-09-04
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: configure: add support for bdver1 and bdver2 CPU types. avio: make avio_close NULL the freed buffer pixdesc: cosmetics proresenc: Don't free a buffer not owned by the codec proresenc: Write the full value in one put_bits call adpcmenc: Calculate the IMA_QT predictor without overflow x86: Add convenience macros to check for CPU extensions and flags x86: h264dsp: drop some unnecessary ifdefs around prototype declarations mss12: merge decode_pixel() and decode_top_left_pixel() mss12: reduce SliceContext size from 1067 to 164 KB mss12: move SliceContexts out of the common context into the codec contexts Conflicts: libavformat/aviobuf.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avio: make avio_close NULL the freed bufferLuca Barbato2012-09-04
| |
* | lavf: fix avio statistics for packets directly read without the buffer.Michael Niedermayer2012-08-25
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/avio: flush internal buffer when calling avio_close()Stefano Sabatini2012-08-18
| | | | | | | | This seems the expected behavior.
* | aviobuf: Fix warning about discarded qualifierjamal2012-07-27
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | cosmetics: various spelling fixesLou Logan2012-07-06
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/aviobuf: use av_assert()Michael Niedermayer2012-06-15
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avio: Collect and print statistics of bytes read & seeksMichael Niedermayer2012-06-15
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-04-28
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: h264: new assembly version of get_cabac for x86_64 with PIC h264: use one table instead of several for cabac functions h264: (trivial) remove unneeded macro argument in x86/cabac.h libschroedingerdec: check malloc segment: reorder seg_write_header allocation avio: make avio_close(NULL) a no-op mov: Parse EC3SpecificBox (dec3 atom). Conflicts: libavcodec/cabac.c libavcodec/x86/cabac.h Merged-by: Michael Niedermayer <michaelni@gmx.at>