summaryrefslogtreecommitdiff
path: root/libavformat/movenchint.c
Commit message (Collapse)AuthorAge
* 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.
* 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: Use av_reallocp() where suitableAlexandra Khirnova2013-09-18
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* 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>
* 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>
* movenc: K&R formatting cosmeticsMartin Storsjö2013-07-07
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* 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>
* 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>
* 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>
* movenc: Use defines instead of hardcoded numbers for RTCP typesMartin Storsjö2012-02-14
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* cosmetics: Remove extra newlines at EOFAlex Converse2012-01-27
|
* 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>
* lavc: make avcodec_alloc_context3 officially public.Anton Khirnov2011-07-10
| | | | Deprecate avcodec_alloc_context/2.
* 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>
* libavformat: Use avcodec_copy_context for chained muxersMartin Storsjö2011-02-04
| | | | | | | | | | | | | This avoids having the chained AVStream->codec point to the same AVCodecContext owned by the outer AVStream. The downside is that changes to the AVCodecContext made after calling av_write_header cannot be detected automatically within the chained muxer. This avoids having to manually unlink the chained AVStream->codec by setting it to null before freeing the chained muxer via generic freeing functions. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* Free AVStream->info in chained muxersMartin Storsjö2011-02-03
| | | | | | | This fixes memory leaks in the RTSP muxer and RTP hinting in the mov muxer present since SVN rev 25418. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* Take ff_write_chained in use in the mov rtp hinter and in the rtsp muxerMartin Storsjö2010-05-21
| | | | Originally committed as revision 23208 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use a heuristic for describing the RTP packets using sample dataMartin Storsjö2010-05-18
| | | | Originally committed as revision 23165 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add initial support for RTP hinting in the mov muxerMartin Storsjö2010-05-18
Originally committed as revision 23164 to svn://svn.ffmpeg.org/ffmpeg/trunk