summaryrefslogtreecommitdiff
path: root/libavformat/rtpenc_mpegts.c
Commit message (Collapse)AuthorAgeFilesLines
* avformat/avformat: Move AVOutputFormat internals out of public headerAndreas Rheinhardt2023-02-091-6/+7
| | | | | | | | | | | | | | This commit does for AVOutputFormat what commit 20f972701806be20a77f808db332d9489343bb78 did for AVCodec: It adds a new type FFOutputFormat, moves all the internals of AVOutputFormat to it and adds a now reduced AVOutputFormat as first member. This does not affect/improve extensibility of both public or private fields for muxers (it is still a mess due to lavd). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avformat: Constify all muxer/demuxersAndreas Rheinhardt2021-04-271-1/+1
| | | | | | | This is possible now that the next-API is gone. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: Constify the API wrt AV(In|Out)putFormatAndreas Rheinhardt2021-04-271-2/+2
| | | | | | | Also constify AVProbeData. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* rtpenc_mpegts: add AVClass to the muxer contextGyan Doshi2021-04-011-0/+1
|
* avformat/rtpenc_mpegts: stop leaksGyan Doshi2021-03-281-4/+8
| | | | Fixes CID 1474460 & 1474461
* avformat/rtpenc_mpegts: convey options for rtp muxerGyan Doshi2021-03-261-1/+6
|
* avformat/rtpenc_mpegts: relay streamid to mpegts muxer streams.Gyan Doshi2021-03-261-0/+1
|
* avformat/rtpenc_mpegts: convey options for mpeg-ts muxerGyan Doshi2021-03-261-1/+23
| | | | Fixes #5239
* avformat/rtp_mpegts: typedef MuxChain structGyan Doshi2021-03-211-6/+6
|
* avformat/rtpenc_mpegts: use av_packet_alloc() to allocate packetsJames Almer2021-03-171-8/+15
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/rtpenc_mpegts: removed unused check of avformat_free_contextSteven Liu2019-12-021-2/+1
| | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Reviewed-by: Jun Zhao <barryjzhao@tencent.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/rtpenc_mpegts: copy metadata to mpegts sub-muxerMoritz Barsnick2019-09-201-0/+2
| | | | | | | Fixes #7293. Signed-off-by: Moritz Barsnick <barsnick@gmx.net> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf: Constify AVOutputFormat pointer.Carl Eugen Hoyos2019-03-201-2/+2
|
* libavformat/rtpenc_mpegts: check avformat_new_stream() return valuePan Bian2017-11-281-0/+4
| | | | | | | | | | The function avformat_new_stream() returns a NULL pointer on failure. However, in function rtp_mpegts_write_header(), its return value is not validated before it is dereferenced. Check the return value against NULL to avoid potential NULL dereference. Signed-off-by: Pan Bian <bianpan2016@163.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-101-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 'cf402d6fa88acd647cdff993429583bec8a34fdc'Michael Niedermayer2015-03-101-2/+1
|\ \ | |/ | | | | | | | | | | | | * commit 'cf402d6fa88acd647cdff993429583bec8a34fdc': rtpenc_mpegts: Set chain->rtp_ctx only after avformat_write_header succeeded Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc_mpegts: Set chain->rtp_ctx only after avformat_write_header succeededMartin Storsjö2015-03-101-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | By making sure we at each time only have one pointer set, either a local variable or one in the context, we avoid potential double frees in the cleanup routines. If chain->rtp_ctx is set, it is closed by calling avformat_write_trailer, but that shouldn't be called unless avformat_write_header succeeded. This issue was pointed out by Andreas Cadhalpun. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'c83dd2d2a458075a58895c384372f57c1ec26276'Michael Niedermayer2015-03-101-1/+1
|\ \ | |/ | | | | | | | | | | | | * commit 'c83dd2d2a458075a58895c384372f57c1ec26276': rtpenc_mpegts: Free the right ->pb in the error path in the init function Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc_mpegts: Free the right ->pb in the error path in the init functionMartin Storsjö2015-03-101-1/+1
| | | | | | | | | | | | This fixes a typo from 8e32b1f096. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '8e32b1f0963d01d4f5d4803eb721f162e0d58d9a'Michael Niedermayer2015-02-251-10/+3
|\ \ | |/ | | | | | | | | | | * 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-241-10/+3
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'fc308b30bb24e623fed042ec78b10803b2362a18'Michael Niedermayer2014-12-201-3/+1
|\ \ | |/ | | | | | | | | | | * commit 'fc308b30bb24e623fed042ec78b10803b2362a18': rtpenc_mpegts: Call write_trailer for the mpegts muxer even if no output buffer exists Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc_mpegts: Call write_trailer for the mpegts muxer even if no output ↵Martin Storsjö2014-12-191-3/+1
| | | | | | | | | | | | | | | | | | | | buffer exists Since the mpegts muxer now can handle being called with a NULL AVIOContext, we don't need to try to allocate one before calling write_trailer. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '8a70ef94b9c377293b3dfa7d92cdc81a4fe1543a'Michael Niedermayer2014-12-191-4/+4
|/ | | | | | | | | | | * commit '8a70ef94b9c377293b3dfa7d92cdc81a4fe1543a': libavformat: Add a muxer wrapping mpegts encoding into RTP Conflicts: Changelog libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
* libavformat: Add a muxer wrapping mpegts encoding into RTPMartin Storsjö2014-12-181-0/+165
Since this structurally is quite different from normal RTP (multiple streams are muxed into one single mpegts stream, which is packetized into one single RTP session), it is kept as a separate muxer. Since this structurally also behaves differently than normal RTP, all of the other muxers that do chained RTP muxing (rtsp, sap, mp4) would need to be updated similarly to handle this - in particular, creating one single rtp_mpegts muxer for the whole presentation instead of one rtp muxer per stream. Signed-off-by: Martin Storsjö <martin@martin.st>