summaryrefslogtreecommitdiff
path: root/libavformat/aviobuf.c
Commit message (Collapse)AuthorAge
* lavf/avio: add avio_accept and avio_handshakeStephan Holljes2015-08-01
| | | | Signed-off-by: Stephan Holljes <klaxa1337@googlemail.com>
* Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'Michael Niedermayer2015-07-27
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '059a934806d61f7af9ab3fd9f74994b838ea5eba': lavc: Consistently prefix input buffer defines Conflicts: doc/examples/decoding_encoding.c libavcodec/4xm.c libavcodec/aac_adtstoasc_bsf.c libavcodec/aacdec.c libavcodec/aacenc.c libavcodec/ac3dec.h libavcodec/asvenc.c libavcodec/avcodec.h libavcodec/avpacket.c libavcodec/dvdec.c libavcodec/ffv1enc.c libavcodec/g2meet.c libavcodec/gif.c libavcodec/h264.c libavcodec/h264_mp4toannexb_bsf.c libavcodec/huffyuvdec.c libavcodec/huffyuvenc.c libavcodec/jpeglsenc.c libavcodec/libxvid.c libavcodec/mdec.c libavcodec/motionpixels.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/noise_bsf.c libavcodec/nuv.c libavcodec/nvenc.c libavcodec/options.c libavcodec/parser.c libavcodec/pngenc.c libavcodec/proresenc_kostya.c libavcodec/qsvdec.c libavcodec/svq1enc.c libavcodec/tiffenc.c libavcodec/truemotion2.c libavcodec/utils.c libavcodec/utvideoenc.c libavcodec/vc1dec.c libavcodec/wmalosslessdec.c libavformat/adxdec.c libavformat/aiffdec.c libavformat/apc.c libavformat/apetag.c libavformat/avidec.c libavformat/bink.c libavformat/cafdec.c libavformat/flvdec.c libavformat/id3v2.c libavformat/isom.c libavformat/matroskadec.c libavformat/mov.c libavformat/mpc.c libavformat/mpc8.c libavformat/mpegts.c libavformat/mvi.c libavformat/mxfdec.c libavformat/mxg.c libavformat/nutdec.c libavformat/oggdec.c libavformat/oggparsecelt.c libavformat/oggparseflac.c libavformat/oggparseopus.c libavformat/oggparsespeex.c libavformat/omadec.c libavformat/rawdec.c libavformat/riffdec.c libavformat/rl2.c libavformat/rmdec.c libavformat/rtpdec_latm.c libavformat/rtpdec_mpeg4.c libavformat/rtpdec_qdm2.c libavformat/rtpdec_svq3.c libavformat/sierravmd.c libavformat/smacker.c libavformat/smush.c libavformat/spdifenc.c libavformat/takdec.c libavformat/tta.c libavformat/utils.c libavformat/vqf.c libavformat/westwood_vqa.c libavformat/xmv.c libavformat/xwma.c libavformat/yop.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-27
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
| * avio: Add avio_put_str16beLuca Barbato2015-06-07
| |
* | avio: fix potential crashes when combining ffio_ensure_seekback + crcwm42015-06-17
| | | | | | | | | | | | | | | | | | | | | | | | Calling ffio_ensure_seekback() if ffio_init_checksum() has been called on the same context can lead to out of bounds memory accesses and crashes. The reason is that ffio_ensure_seekback() does not update checksum_ptr after reallocating the buffer, resulting in a dangling pointer. This effectively fixes potential crashes when opening mp3 files. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/avio: move short seek threshold to the contextMichael Niedermayer2015-06-11
| | | | | | | | | | | | This allows us to adjust it internally. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/aviobuf: Check for ffio_set_buf_size() failureMichael Niedermayer2015-06-07
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'bff0349d9da527084e1433167466d8afc9e25c7f'Michael Niedermayer2015-06-01
|\| | | | | | | | | | | | | * commit 'bff0349d9da527084e1433167466d8afc9e25c7f': avio: Add avio_read wrapper to simplify error checking Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avio: Add avio_read wrapper to simplify error checkingVittorio Giovara2015-05-31
| | | | | | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | avformat: add callback for opening further filesMichael Niedermayer2015-05-11
| | | | | | | | | | Previous version reviewed-by: wm4 <nfxjfg@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/aviobuf: Do not resize the buffer in ffio_ensure_seekback() if ↵Michael Niedermayer2015-04-27
| | | | | | | | | | | | | | | | | | there is no read function Without a read function there can never be more data read than the buffer could hold Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'b97f427fb56bdbf7de8e2d4b72d01114aa6eceda'Michael Niedermayer2015-03-12
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit 'b97f427fb56bdbf7de8e2d4b72d01114aa6eceda': lavf: Explicitly convert types at function pointer assignment Conflicts: libavformat/avio.c libavformat/aviobuf.c libavformat/swfenc.c See: a76a2ffe9d7773d59bb1bc228a6660e23672c490 and others Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: Explicitly convert types at function pointer assignmentDiego Biurrun2015-03-11
| | | | | | | | This fixes a number of "assignment from incompatible pointer type" warnings.
* | libavformat/avio: added avio_put_str16beMark Reid2015-03-03
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'c86d8aed748adc3ba8df96fb1fe14aa45da77a31'Michael Niedermayer2015-02-28
|\| | | | | | | | | | | | | * commit 'c86d8aed748adc3ba8df96fb1fe14aa45da77a31': avio: Rename avclass symbols relating to avio Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avio: Rename avclass symbols relating to avioMartin Storsjö2015-02-28
| | | | | | | | | | | | | | Don't prefix them ffio_url, which is misleading, sounding too much like the urlprotocol layer (like ffurl_*). Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '8a273a746061a112e5e35066a8fd8e146d821a62'Michael Niedermayer2015-02-25
|\| | | | | | | | | | | | | * commit '8a273a746061a112e5e35066a8fd8e146d821a62': avio: Add an internal utility function for freeing dynamic buffers Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avio: Add an internal utility function for freeing dynamic buffersMartin Storsjö2015-02-24
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | avformat/aviobuf: Allow seeking to the end of the buffer for read only buffersMichael Niedermayer2015-01-28
| | | | | | | | | | | | This undoes the effect of 3c18a7b18807de81566381a1bcbe9f6103c0296b for reading Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '3c18a7b18807de81566381a1bcbe9f6103c0296b'Michael Niedermayer2015-01-28
|\| | | | | | | | | | | | | | | | | | | * commit '3c18a7b18807de81566381a1bcbe9f6103c0296b': avio: Do not consider the end-of-buffer position valid Conflicts: libavformat/aviobuf.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avio: Do not consider the end-of-buffer position validLuca Barbato2015-01-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Trigger a refill if the seek action moves the pointer at the end of the buffer. Before this patch the read action following the seek would trigger the refill, while write action would write outside the buffer. In the Libav codebase few muxers seek forward outside of what already has been written so it is quite unlikely to experience the problem with the default buffer size. CC: libav-stable@libav.org
* | avformat/aviobuf: Check that avio_seek() target is non negativeMichael Niedermayer2014-12-14
| | | | | | | | | | | | | | Fixes out of array access Suggested-by: Andrew Scherkus <scherkus@google.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/aviobuf: Fix infinite loop in ff_get_line()Michael Niedermayer2014-12-03
| | | | | | | | | | | | Fixes ticket4152 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'd7f530b0d67fe3996dbfa990a47c865e0d1400a2'Michael Niedermayer2014-10-20
|\| | | | | | | | | | | | | | | * commit 'd7f530b0d67fe3996dbfa990a47c865e0d1400a2': aviobuf: check context before using it See: 7441d1ec330da810a0ffd44a02b2fc60add5b719 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * aviobuf: check context before using itVittorio Giovara2014-10-20
| | | | | | | | | | | | | | Avoid a possible null pointer dereference. CC: libav-stable@libav.org Bug-Id: CID 1135769
* | avformat/aviobuf: fix avio_flush() for read streamswm42014-09-30
| | | | | | | | | | | | | | avio_flush() did nothing useful for read streams. Fix it to behave as expected, and discard the currently read buffer properly. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/aviobuf: remove uses of deprecated url_feof()Michael Niedermayer2014-08-27
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/avio: rename url_feof() to avio_feof()James Almer2014-08-08
| | | | | | | | | | | | | | It's a public function and should use the avio_ namespace Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Add int64_t probesize2 instead of int probesize to AVFormatContext.Carl Eugen Hoyos2014-07-30
| | | | | | | | | | Allows to set a probesize >2G. Tested-by: Oliver Fromme
* | lavf/avio: do not include bprint.h.Nicolas George2014-07-25
| | | | | | | | | | | | | | | | | | C++ chokes on the definition of AVBPrint. Including avio.h from c++ code used to work. Fix trac ticket #3800. Signed-off-by: Nicolas George <george@nsup.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avio: Introduce avio_read_to_bprint(avioctx, bp, max_size)Andrey Utkin2014-07-23
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/aviobuf/ff_get_line: also accept \r as end of line characterMichael Niedermayer2014-05-17
| | | | | | | | | | | | Fixes Ticket3108 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | 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>