summaryrefslogtreecommitdiff
path: root/libavformat/aviobuf.c
Commit message (Collapse)AuthorAge
...
| * 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>
| * avio: make avio_close(NULL) a no-opLuca Barbato2012-04-27
| | | | | | | | Its behaviour in line with ffurl_close(NULL).
* | Add AVIO_FLAG_DIRECT.Reimar Döffinger2012-04-04
| | | | | | | | | | | | | | | | Allows avoiding the buffer when using avio read, write and seek functions. When using the ffmpeg executable -avioflags direct can be used to enable this mode for input files, but has no effect on output files. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | libavformat: Fix several "incompatible pointer type" warnings.Michael Niedermayer2012-03-30
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-28
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (71 commits) movenc: Allow writing to a non-seekable output if using empty moov movenc: Support adding isml (smooth streaming live) metadata libavcodec: Don't crash in avcodec_encode_audio if time_base isn't set sunrast: Document the different Sun Raster file format types. sunrast: Add a check for experimental type. libspeexenc: use AVSampleFormat instead of deprecated/removed SampleFormat lavf: remove disabled FF_API_SET_PTS_INFO cruft lavf: remove disabled FF_API_OLD_INTERRUPT_CB cruft lavf: remove disabled FF_API_REORDER_PRIVATE cruft lavf: remove disabled FF_API_SEEK_PUBLIC cruft lavf: remove disabled FF_API_STREAM_COPY cruft lavf: remove disabled FF_API_PRELOAD cruft lavf: remove disabled FF_API_NEW_STREAM cruft lavf: remove disabled FF_API_RTSP_URL_OPTIONS cruft lavf: remove disabled FF_API_MUXRATE cruft lavf: remove disabled FF_API_FILESIZE cruft lavf: remove disabled FF_API_TIMESTAMP cruft lavf: remove disabled FF_API_LOOP_OUTPUT cruft lavf: remove disabled FF_API_LOOP_INPUT cruft lavf: remove disabled FF_API_AVSTREAM_QUALITY cruft ... Conflicts: doc/APIchanges libavcodec/8bps.c libavcodec/avcodec.h libavcodec/libx264.c libavcodec/mjpegbdec.c libavcodec/options.c libavcodec/sunrast.c libavcodec/utils.c libavcodec/version.h libavcodec/x86/h264_deblock.asm libavdevice/libdc1394.c libavdevice/v4l2.c libavformat/avformat.h libavformat/avio.c libavformat/avio.h libavformat/aviobuf.c libavformat/dv.c libavformat/mov.c libavformat/utils.c libavformat/version.h libavformat/wtv.c libavutil/Makefile libavutil/file.c libswscale/x86/input.asm libswscale/x86/swscale_mmx.c libswscale/x86/swscale_template.c tests/ref/lavf/ffm Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: remove disabled FF_API_OLD_AVIO cruftAnton Khirnov2012-01-27
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-08
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (29 commits) cabac: Move code only used within the CABAC test program into the test program. vp56: Drop unnecessary cabac.h #include. h264-test: Initialize AVCodecContext.av_class. build: Skip compiling network.h and rtsp.h if networking is not enabled. cosmetics: drop some pointless parentheses Disable annoying warning without changing behavior faq: Solutions for common problems with sample paths when running FATE. avcodec: attempt to clarify the CODEC_CAP_DELAY documentation avcodec: fix avcodec_encode_audio() documentation. FATE: xmv-demux test; exercise the XMV demuxer without decoding the perceptual codecs inside. vqf: recognize more metadata chunks FATE test: BMV demuxer and associated video and audio decoders. FATE: indeo4 video decoder test. FATE: update xxan-wc4 test to a sample with more code coverage. Change the recent h264_mp4toannexb bitstream filter test to output to an elementary stream rather than a program stream. g722enc: validate AVCodecContext.trellis g722enc: set frame_size, and also handle an odd number of input samples g722enc: split encoding into separate functions for trellis vs. no trellis mpegaudiodec: Use clearer pointer math tta: Fix returned error code at EOF ... Conflicts: libavcodec/h264.c libavcodec/indeo3.c libavcodec/interplayvideo.c libavcodec/ivi_common.c libavcodec/libxvidff.c libavcodec/mpegvideo.c libavcodec/ppc/mpegvideo_altivec.c libavcodec/tta.c libavcodec/utils.c libavfilter/vsrc_buffer.c libavformat/Makefile tests/fate/indeo.mak tests/ref/acodec/g722 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cosmetics: drop some pointless parenthesesDiego Biurrun2012-01-07
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-05
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (46 commits) mtv: Make sure audio_subsegments is not 0 v4l2: use V4L2_FMT_FLAG_EMULATED only if it is defined avconv: add symbolic names for -vsync parameters flvdec: Fix compiler warning for uninitialized variables rtsp: Fix compiler warning for uninitialized variable ulti: convert to new bytestream API. swscale: Use standard multiple inclusion guards in ppc/ header files. Place some START_TIMER invocations in separate blocks. v4l2: list available formats v4l2: set the proper codec_tag v4l2: refactor device_open v4l2: simplify away io_method v4l2: cosmetics v4l2: uniform and format options v4l2: do not force interlaced mode avio: exit early in fill_buffer without read_packet vc1dec: fix invalid memory access for small video dimensions rv34: fix invalid memory access for small video dimensions rv34: joint coefficient decoding and dequantization avplay: Don't call avio_set_interrupt_cb(NULL) ... Conflicts: Changelog avconv.c doc/APIchanges doc/indevs.texi libavcodec/adxenc.c libavcodec/dnxhdenc.c libavcodec/h264.c libavdevice/v4l2.c libavformat/flvdec.c libavformat/mtv.c libswscale/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-14
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: lavf: pass options from AVFormatContext to avio. avformat: Use avio_open2, pass the AVFormatContext interrupt_callback onwards avio: add avio_open2, taking an interrupt callback and options avio: add support for passing options to protocols. avio: add and use ffurl_protocol_next(). avformat: Pass the interrupt callback on to chained muxers/demuxers avio: Add an AVIOInterruptCB parameter to ffurl_open/ffurl_alloc avformat: Use ff_check_interrupt avio: Add an internal utility function for checking the new interrupt callback avio: Add AVIOInterruptCB texi2html: remove stray \n doc: prettyfy the texi2html documentation swscale: handle unaligned buffers in yuv2plane1 Conflicts: libavformat/avformat.h libavformat/avio.c libavformat/mov.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-03
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (44 commits) replacement Indeo 3 decoder gsm demuxer: do not allocate packet twice. flvenc: use first packet delay as global delay. ac3enc: doxygen update. imc: return error codes instead of 0 for error conditions. imc: return meaningful error codes instead of -1 imc: do not set channel layout for stereo imc: validate channel count imc: check for ff_fft_init() failure imc: check output buffer size before decoding imc: use DSPContext.bswap16_buf() to byte-swap packet data rtsp: add allowed_media_types option libgsm: add flush function to reset the decoder state when seeking libgsm: simplify decoding by using a loop gsm: log error message when packet is too small libgsmdec: do not needlessly set *data_size to 0 gsmdec: do not needlessly set *data_size to 0 gsmdec: add flush function to reset the decoder state when seeking libgsmdec: check output buffer size before decoding gsmdec: log error message when output buffer is too small. ... Conflicts: Changelog ffplay.c libavcodec/indeo3.c libavcodec/mjpeg_parser.c libavcodec/vp3.c libavformat/cutils.c libavformat/id3v2.c libavutil/parseutils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Remove some stray unnecessary ffmpeg references.Diego Biurrun2011-11-02
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-18
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: avconv: add presets rtsp: Expose the flag options via private AVOptions for sdp and rtp, too rtsp: Make the rtsp flags avoptions set via a define rtpenc: Set a default video codec avoptions: Fix av_opt_flag_is_set rtp: Fix ff_rtp_get_payload_type doc: Update the documentation on setting options for RTSP rtsp: Remove the separate filter_source variable rtsp: Accept options via private avoptions instead of URL options rtsp: Simplify AVOption definitions rtsp: Merge the AVOption lists lavfi: port libmpcodecs delogo filter lavfi: port boxblur filter from libmpcodecs lavfi: add negate filter lavfi: add LUT (LookUp Table) generic filters AVOptions: don't segfault on NULL parameter in av_set_options_string() avio: Check for invalid buffer length. mpegenc/mpegtsenc: add muxrate private options. lavf: deprecate AVFormatContext.file_size mov: add support for TV metadata atoms tves, tvsn and stik Conflicts: Changelog doc/filters.texi doc/protocols.texi libavfilter/Makefile libavfilter/allfilters.c libavfilter/avfilter.h libavfilter/formats.c libavfilter/internal.h libavfilter/vf_boxblur.c libavfilter/vf_delogo.c libavfilter/vf_lut.c libavformat/mpegtsenc.c libavformat/utils.c libavformat/version.h libavutil/opt.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avio: Check for invalid buffer length.Alex Converse2011-10-16
| |
* | aviobuf: Replace av_realloc by av_realloc_f when relevant.Nicolas George2011-09-28
| | | | | | | | | | Signed-off-by: Nicolas George <nicolas.george@normalesup.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>