summaryrefslogtreecommitdiff
path: root/libavformat/movenchint.c
Commit message (Collapse)AuthorAge
* av(format|device): Add const to muxer packet data pointersAndreas Rheinhardt2022-07-09
| | | | | | | The packets given to muxers need not be writable, so it is best to access them via const uint8_t*. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/internal: Move muxing-only functions to new mux.h headerAndreas Rheinhardt2022-05-10
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/movenchint: Simplify writing paddingAndreas Rheinhardt2021-09-24
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/movenc: use av_packet_alloc() to allocate packetsJames Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '9200514ad8717c63f82101dc394f4378854325bf': lavf: replace AVStream.codec with AVStream.codecpar This has been a HUGE effort from: - Derek Buitenhuis <derek.buitenhuis@gmail.com> - Hendrik Leppkes <h.leppkes@gmail.com> - wm4 <nfxjfg@googlemail.com> - Clément Bœsch <clement@stupeflix.com> - James Almer <jamrial@gmail.com> - Michael Niedermayer <michael@niedermayer.cc> - Rostislav Pehlivanov <atomnuker@gmail.com> Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavf: replace AVStream.codec with AVStream.codecparAnton Khirnov2016-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, AVStream contains an embedded AVCodecContext instance, which is used by demuxers to export stream parameters to the caller and by muxers to receive stream parameters from the caller. It is also used internally as the codec context that is passed to parsers. In addition, it is also widely used by the callers as the decoding (when demuxer) or encoding (when muxing) context, though this has been officially discouraged since Libav 11. There are multiple important problems with this approach: - the fields in AVCodecContext are in general one of * stream parameters * codec options * codec state However, it's not clear which ones are which. It is consequently unclear which fields are a demuxer allowed to set or a muxer allowed to read. This leads to erratic behaviour depending on whether decoding or encoding is being performed or not (and whether it uses the AVStream embedded codec context). - various synchronization issues arising from the fact that the same context is used by several different APIs (muxers/demuxers, parsers, bitstream filters and encoders/decoders) simultaneously, with there being no clear rules for who can modify what and the different processes being typically delayed with respect to each other. - avformat_find_stream_info() making it necessary to support opening and closing a single codec context multiple times, thus complicating the semantics of freeing various allocated objects in the codec context. Those problems are resolved by replacing the AVStream embedded codec context with a newly added AVCodecParameters instance, which stores only the stream parameters exported by the demuxers or read by the muxers.
* | Merge commit '8e32b1f0963d01d4f5d4803eb721f162e0d58d9a'Michael Niedermayer2015-02-25
|\| | | | | | | | | | | | | * commit '8e32b1f0963d01d4f5d4803eb721f162e0d58d9a': libavformat: Use ffio_free_dyn_buf where applicable Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * libavformat: Use ffio_free_dyn_buf where applicableMartin Storsjö2015-02-24
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
| * movenchint: Clear size and len if the realloc failedMartin Storsjö2013-09-22
| | | | | | | | | | | | | | | | Previously these were left in an inconsistent state. Pointed out by Michael Niedermayer. Signed-off-by: Martin Storsjö <martin@martin.st>
* | avformat/movenchint: use av_freep() for safetyMichael Niedermayer2014-08-17
| | | | | | | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mux: support re-interleaving packets in ff_write_chained()Michael Niedermayer2014-07-24
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Revert "avformat/movenchint: Fix movhinting with ff_rtp_chain_mux_open() ↵Michael Niedermayer2014-05-31
| | | | | | | | | | | | | | | | from abb810db036628e11a5171134ebe320b187ee6d6" This has become unneeded due to f797b134cad4d248b1c8955659997980d0668bc3 This reverts commit 1fe40e1b0538a8eb8425123c47775b5d141ae084.
* | avformat/movenchint: Fix movhinting with ff_rtp_chain_mux_open() from ↵Michael Niedermayer2014-05-30
| | | | | | | | | | | | abb810db036628e11a5171134ebe320b187ee6d6 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/movenchint: use realloc_array() to protect against integer overflowMichael Niedermayer2013-09-22
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/movenchint: only change queue size if reallocation succeededMichael Niedermayer2013-09-22
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/movenchint: revert "Use av_reallocp() where suitable"Michael Niedermayer2013-09-22
| | | | | | | | | | | | | | reverts movenchin part of 5626f994f273af80fb100d4743b963304de9e05c The change left the fields in an inconsistent state Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | 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 remote-tracking branch 'qatar/master'Michael Niedermayer2013-07-09
|\| | | | | | | | | | | | | * qatar/master: movenc: Rename the timestamp parameter to dts in write_hint_packets Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Rename the timestamp parameter to dts in write_hint_packetsMartin Storsjö2013-07-08
| | | | | | | | | | | | This matches its actual intended use better. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'a87a0acf9b5d27aad032e61eef4973e62a4a6830'Michael Niedermayer2013-07-09
|\| | | | | | | | | | | | | * commit 'a87a0acf9b5d27aad032e61eef4973e62a4a6830': movenc: Make sure the RTP hint tracks have nondecreasing DTS Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Make sure the RTP hint tracks have nondecreasing DTSMartin Storsjö2013-07-08
| | | | | | | | | | | | | | | | | | The RTP timestamps can be decreasing for codecs with B-frames. For these cases, make sure the timestamps in the MP4 file track itself are nondecreasing, and add an offset to the RTP packet hint instead to produce the intended RTP timestamp. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '21732063a346475eb22c332b27e8216b79f9ad4a'Michael Niedermayer2013-07-08
|\| | | | | | | | | | | | | | | | | | | * commit '21732063a346475eb22c332b27e8216b79f9ad4a': movenc: K&R formatting cosmetics Conflicts: libavformat/movenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: K&R formatting cosmeticsMartin Storsjö2013-07-07
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-11-15
|\| | | | | | | | | | | | | | | | | | | | | * qatar/master: bgmc: Fix av_malloc checks in ff_bgmc_init() rtp: set the payload type as stream id Conflicts: libavformat/rtpenc_chain.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtp: set the payload type as stream idLuca Barbato2012-11-14
| | | | | | | | | | | | | | Support multiple video/audio streams with different format in the same session. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-05-26
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: opt: Add av_opt_set_bin() avconv: Display the error returned by avformat_write_header rtpenc_chain: Return an error code instead of just a plain pointer rtpenc_chain: Free the URLContext on failure rtpenc: Expose the ssrc as an avoption avprobe: display the codec profile in show_stream() avprobe: fix function prototype cosmetics: Fix indentation avprobe: changelog entry avprobe: update documentation avprobe: provide JSON output avprobe: output proper INI format avprobe: improve formatting rtmp: fix url parsing fate: document TARGET_EXEC and its usage Conflicts: doc/APIchanges doc/fate.texi doc/ffprobe.texi ffprobe.c libavformat/version.h libavutil/avutil.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc_chain: Return an error code instead of just a plain pointerMartin Storsjö2012-05-26
| | | | | | | | | | | | Also check the return value in sapenc. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-02-17
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: shorten: Use separate pointers for the allocated memory for decoded samples. atrac3: Fix crash in tonal component decoding. ws_snd1: Fix wrong samples counts. movenc: Don't set a default sample duration when creating ismv rtp: Factorize the check for distinguishing RTCP packets from RTP golomb: avoid infinite loop on all-zero input (or end of buffer). bethsoftvid: synchronize video timestamps with audio sample rate bethsoftvid: add audio stream only after getting the first audio packet bethsoftvid: Set video packet duration instead of accumulating pts. bethsoftvid: set packet key frame flag for audio and I-frame video packets. bethsoftvid: fix read_packet() return codes. bethsoftvid: pass palette in side data instead of in a separate packet. sdp: Ignore RTCP packets when autodetecting RTP streams proresenc: initialise 'sign' variable mpegaudio: replace memcpy by SIMD code vc1: prevent using last_frame as a reference for I/P first frame. Conflicts: libavcodec/atrac3.c libavcodec/golomb.h libavcodec/shorten.c libavcodec/ws-snd1.c tests/ref/fate/bethsoft-vid Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtp: Factorize the check for distinguishing RTCP packets from RTPMartin Storsjö2012-02-16
| | | | | | | | | | | | The binary doesn't change after this patch. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-02-15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (21 commits) CDXL demuxer and decoder hls: Re-add legacy applehttp name to preserve interface compatibility. hlsproto: Rename the functions and context hlsproto: Encourage users to try the hls demuxer instead of the proto doc: Move the hls protocol section into the right place libavformat: Rename the applehttp protocol to hls hls: Rename the functions and context libavformat: Rename the applehttp demuxer to hls rtpdec: Support H263 in RFC 2190 format rv30: check block type validity ttadec: CRC checking movenc: Support muxing VC1 avconv: Don't split out inline sequence headers when stream copying VC1 rv34: handle size changes during frame multithreading rv40: prevent undefined signed overflow in rv40_loop_filter() rv34: use AVERROR return values in ff_rv34_decode_frame() rv34: use uint16_t for RV34DecContext.deblock_coefs librtmp: Add "lib" prefix to librtmp URLProtocol declarations. movenc: Use defines instead of hardcoded numbers for RTCP types smjpegdec: implement seeking ... Conflicts: Changelog doc/general.texi libavcodec/avcodec.h libavcodec/rv30.c libavcodec/tta.c libavcodec/version.h libavformat/Makefile libavformat/allformats.c libavformat/version.h libswscale/x86/swscale_mmx.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Use defines instead of hardcoded numbers for RTCP typesMartin Storsjö2012-02-14
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-29
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: aacenc: Fix LONG_START windowing. aacenc: Fix a bug where deinterleaved samples were stored in the wrong place. avplay: use the correct array size for stride. lavc: extend doxy for avcodec_alloc_context3(). APIchanges: mention avcodec_alloc_context()/2/3 avcodec_align_dimensions2: set only 4 linesizes, not AV_NUM_DATA_POINTERS. aacsbr: ARM NEON optimised sbrdsp functions aacsbr: align some arrays aacsbr: move some simdable loops to function pointers cosmetics: Remove extra newlines at EOF Conflicts: libavcodec/utils.c libavfilter/formats.c libavutil/mem.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cosmetics: Remove extra newlines at EOFAlex Converse2012-01-27
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-12
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: x86: cabac: replace explicit memory references with "m" operands avplay: don't request a stereo downmix wmapro: use av_float2int() lavc: avoid invalid memcpy() in avcodec_default_release_buffer() lavu: replace int/float punning functions lavfi: install libavfilter/vsrc_buffer.h Remove extraneous semicolons sdp: Restore the original mp4 format h264 extradata if converted rtpenc: Add support for mp4 format h264 rtpenc: Simplify code by introducing a separate end pointer movenc: Use the actual converted sample for RTP hinting Fix a bunch of common typos. Conflicts: doc/developer.texi doc/eval.texi doc/filters.texi doc/protocols.texi ffmpeg.c ffplay.c libavcodec/mpegvideo.h libavcodec/x86/cabac.h libavfilter/Makefile libavformat/avformat.h libavformat/cafdec.c libavformat/flvdec.c libavformat/flvenc.c libavformat/gxfenc.c libavformat/img2.c libavformat/movenc.c libavformat/mpegts.c libavformat/rtpenc_h264.c libavformat/utils.c libavformat/wtv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * movenc: Use the actual converted sample for RTP hintingMartin Storsjö2011-12-11
| | | | | | | | | | | | | | | | | | | | | | | | | | If an annex b bitstream is muxed into mov, the actual written sample is reformatted to mp4 syntax before writing. Currently, the RTP hints that copy data from the normal video track, where the payload data might be offset compared to the original sample that the RTP hinting used (when 3 byte annex b startcodes have been converted into 4 byte mp4 format startcodes). Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '142e76f1055de5dde44696e71a5f63f2cb11dedf'Michael Niedermayer2011-07-11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '142e76f1055de5dde44696e71a5f63f2cb11dedf': swscale: fix crash with dithering due incorrect offset calculation. matroskadec: fix stupid typo (!= -> ==) build: remove duplicates from order-only directory prerequisite list build: rework rules for things in the tools dir configure: fix --cpu=host with gcc 4.6 ARM: use const macro to define constant data in asm bitdepth: simplify FUNC/FUNCC macros dsputil: remove ff_emulated_edge_mc macro used in one place 9/10-bit: simplify clipping macros matroskadec: reindent matroskadec: defer parsing of cues element until we seek. lavc: add support for codec-specific defaults. lavc: make avcodec_alloc_context3 officially public. lavc: remove a half-working attempt at different defaults for audio/video codecs. ac3dec: add a drc_scale private option lavf: add avformat_find_stream_info() lavc: introduce avcodec_open2() as a replacement for avcodec_open(). Conflicts: Makefile libavcodec/utils.c libavformat/avformat.h libswscale/swscale_internal.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: make avcodec_alloc_context3 officially public.Anton Khirnov2011-07-10
| | | | | | | | Deprecate avcodec_alloc_context/2.
* | Merge remote branch 'qatar/master'Michael Niedermayer2011-04-04
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: fate: fix partial run when no samples path is specified ARM: NEON fixed-point forward MDCT ARM: NEON fixed-point FFT lavf: bump minor version and add an APIChanges entry for avio changes avio: simplify url_open_dyn_buf_internal by using avio_alloc_context() avio: make url_fdopen internal. avio: make url_open_dyn_packet_buf internal. avio: avio_ prefix for url_close_dyn_buf avio: avio_ prefix for url_open_dyn_buf avio: introduce an AVIOContext.seekable field ac3enc: use generic fixed-point mdct lavfi: add fade filter Change yadif to not use out of picture lines. lavc: deprecate AVCodecContext.antialias_algo lavc: mark mb_qmin/mb_qmax for removal on next major bump. Conflicts: doc/filters.texi libavcodec/ac3enc_fixed.h libavcodec/ac3enc_float.h libavfilter/Makefile libavfilter/allfilters.c libavfilter/vf_fade.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * 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
| |
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
| * avio: add avio_tell macro as a replacement for url_ftellAnton Khirnov2011-03-04
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * avio: avio_ prefix for url_fseekAnton Khirnov2011-03-01
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * avio: avio: avio_ prefixes for put_* functionsAnton Khirnov2011-02-21
| | | | | | | | | | | | | | | | | | | | | | | | In the name of consistency: put_byte -> avio_w8 put_<type> -> avio_w<type> put_buffer -> avio_write put_nbyte will be made private put_tag will be merged with avio_put_str Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * avio: rename ByteIOContext to AVIOContext.Anton Khirnov2011-02-20
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * lavf: add av_ prefix to dump_format()Anton Khirnov2011-02-16
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
| * movenchint: Use rtpenc_chain for setting up the chained RTP muxerMartin Storsjö2011-02-04
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * Use avformat_free_context for cleaning up muxersMartin Storsjö2011-02-04
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>