summaryrefslogtreecommitdiff
path: root/libavformat/smoothstreamingenc.c
Commit message (Collapse)AuthorAge
* avformat: migrate to AVFormatContext->urlMarton Balint2018-01-28
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* Remove some unneeded casts of bit_rate.Carl Eugen Hoyos2017-09-22
|
* Use the new AVIOContext destructor.Anton Khirnov2017-09-01
| | | | | (cherry picked from commit 6f554521afdf7ab4edbfaa9536660a1dca946b19) Signed-off-by: James Almer <jamrial@gmail.com>
* lavf: Remove codec_tag from dashenc and smoothstreamingencMartin Storsjö2017-07-04
| | | | | | | | | Skip the codec_tag altogether here, to let the user (try to) set whichever codec/tag is preferred; the individual chained muxer will reject invalid codecs anyway. (cherry picked from commit 61f589e31e84ae02d7ac6837f30f19c437b1fc2e) Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* Merge commit 'fab8156b2f30666adabe227b3d7712fd193873b1'Derek Buitenhuis2016-04-21
|\ | | | | | | | | | | | | * commit 'fab8156b2f30666adabe227b3d7712fd193873b1': avio: Copy URLContext generic options into child URLContexts Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * avio: Copy URLContext generic options into child URLContextsMartin Storsjö2016-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since all URLContexts have the same AVOptions, such AVOptions will be applied on the outermost context only and removed from the dict, while they probably make sense on all contexts. This makes sure that rw_timeout gets propagated to the innermost URLContext (to make sure it gets passed to the tcp protocol, when opening a http connection for instance). Alternatively, such matching options would be kept in the dict and only removed after the ffurl_connect call. Signed-off-by: Martin Storsjö <martin@martin.st>
* | 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.
| * lavf: add a protocol whitelist/blacklist for file opened internallyAnton Khirnov2016-02-22
| | | | | | | | | | | | | | | | Should make the default behaviour safer for careless callers that open random untrusted files. Bug-Id: CVE-2016-1897 Bug-Id: CVE-2016-1898
| * urlprotocol: receive a list of protocols from the callerAnton Khirnov2016-02-22
| | | | | | | | | | This way, the decisions about which protocols are available for use in any given situations can be delegated to the caller.
* | avformat: Add a protocol blacklisting APIDerek Buitenhuis2016-03-04
| | | | | | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | Merge commit 'e192cd9ce2b51c2e6919f2a78b1ce53e0024e728'Derek Buitenhuis2016-02-29
|\| | | | | | | | | | | | | * commit 'e192cd9ce2b51c2e6919f2a78b1ce53e0024e728': smoothstreamingenc: do not open the files as read+write Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * smoothstreamingenc: do not open the files as read+writeAnton Khirnov2016-02-22
| | | | | | | | They are only written to, never read.
* | Merge commit '9f61abc8111c7c43f49ca012e957a108b9cc7610'Derek Buitenhuis2016-02-10
|\| | | | | | | | | | | | | | | | | This also deprecates our old duplicated callbacks. * commit '9f61abc8111c7c43f49ca012e957a108b9cc7610': lavf: allow custom IO for all files Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavf: allow custom IO for all filesAnton Khirnov2016-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some (de)muxers open additional files beyond the main IO context. Currently, they call avio_open() directly, which prevents the caller from using custom IO for such streams. This commit adds callbacks to AVFormatContext that default to avio_open2()/avio_close(), but can be overridden by the caller. All muxers and demuxers using AVIO are switched to using those callbacks instead of calling avio_open()/avio_close() directly. (de)muxers that use the URLProtocol layer directly instead of AVIO remain unconverted for now. This should be fixed in later commits.
* | Update demuxers and protocols for protocol whitelist supportMichael Niedermayer2016-02-02
| | | | | | | | | | Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat: use AV_OPT_TYPE_BOOL in a bunch of placesClément Bœsch2015-12-04
| |
* | lavc: Switch bitrate to 64bit unless compatibility with avconv was requested.Michael Niedermayer2015-09-15
| |
* | Merge commit 'daf8cf358a098a903d59adb6c0d0cc3262a8c93e'Michael Niedermayer2015-02-14
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'daf8cf358a098a903d59adb6c0d0cc3262a8c93e': avformat: Don't anonymously typedef structs Conflicts: libavformat/adtsenc.c libavformat/aiffenc.c libavformat/avidec.c libavformat/gif.c libavformat/iff.c libavformat/img2dec.c libavformat/jvdec.c libavformat/matroskadec.c libavformat/udp.c libavformat/wtvdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Don't anonymously typedef structsDiego Biurrun2015-02-14
| |
| * smoothstreamingenc: Add a missing "goto fail"Michael Niedermayer2015-01-19
| | | | | | | | | | | | | | | | This goto wasn't necessary originally, but it should have been added when the write_manifest call was added in 8e276378. CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* | avformat/smoothstreamingenc: Add missing "goto fail"Michael Niedermayer2015-01-14
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/smoothstreamingenc: Use av_freep() avoid leaving stale pointers in ↵Michael Niedermayer2014-12-25
| | | | | | | | | | | | memory Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '675ac56b7ee0f204963fde55295197c5df80aa91'Michael Niedermayer2014-11-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit '675ac56b7ee0f204963fde55295197c5df80aa91': Revert "lavf: Don't try to update files atomically with renames on windows" Conflicts: libavformat/dashenc.c libavformat/hdsenc.c libavformat/internal.h libavformat/smoothstreamingenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Revert "lavf: Don't try to update files atomically with renames on windows"Martin Storsjö2014-11-27
| | | | | | | | | | | | | | | | | | This reverts commit b9d08c77a44390b0848c06f20bc0e9e951ba6a3c. After taking MoveFileEx into use, we can replace files with renames on windows as well. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'b9d08c77a44390b0848c06f20bc0e9e951ba6a3c'Michael Niedermayer2014-11-25
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit 'b9d08c77a44390b0848c06f20bc0e9e951ba6a3c': lavf: Don't try to update files atomically with renames on windows Conflicts: libavformat/dashenc.c libavformat/hdsenc.c libavformat/internal.h libavformat/smoothstreamingenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: Don't try to update files atomically with renames on windowsMartin Storsjö2014-11-24
| | | | | | | | | | | | | | | | | | On windows, rename(2) will fail if the target file exists. On unix this trick is used to make sure that people reading the file either will get the full previous file, or the full new version of the file, but no intermediate version. Signed-off-by: Martin Storsjö <martin@martin.st>
* | avformat: Read errno before av_log() as the callback from av_log() might ↵Michael Niedermayer2014-10-25
| | | | | | | | | | | | affect errno Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat: Print error message on failure of ff_rename()Michael Niedermayer2014-10-25
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '7785ce1c769369abf85b276148548a5510aabb5f'Michael Niedermayer2014-10-25
|\| | | | | | | | | | | | | | | | | | | | | | | * commit '7785ce1c769369abf85b276148548a5510aabb5f': lavf: replace rename() with ff_rename() Conflicts: libavformat/hdsenc.c libavformat/internal.h See: 95d2fc6a76f3e0a98329f1ca70f98e7c085f0abf Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: replace rename() with ff_rename()Luca Barbato2014-10-24
| | | | | | | | | | | | | | | | | | The new function wraps errno so that its value is correctly reported when other functions overwrite it (eg. in case of logging). CC: libav-stable@libav.org Bug-Id: CID 1135748 Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit 'e73d26bbd65f1ac5fc73ef3fd24cab1bed8ba2e2'Michael Niedermayer2014-10-21
|\| | | | | | | | | | | | | | | | | | | | | * commit 'e73d26bbd65f1ac5fc73ef3fd24cab1bed8ba2e2': smoothstreamingenc: explict cast to avoid overflow Conflicts: libavformat/smoothstreamingenc.c See: b399816d9c3d0fc3efd742b04f269c1055cc6e2b Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * smoothstreamingenc: explict cast to avoid overflowVittorio Giovara2014-10-21
| | | | | | | | | | CC: libav-stable@libav.org Bug-Id: CID 732248
* | Merge commit '8bef43388132b53f59a6e90add18900a3bb4cc60'Michael Niedermayer2014-10-12
|\| | | | | | | | | | | | | * commit '8bef43388132b53f59a6e90add18900a3bb4cc60': smoothstreamingenc: Simplify code by removing a redundant variable Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * smoothstreamingenc: Simplify code by removing a redundant variableMartin Storsjö2014-10-12
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '28816050e47b6dba430a52e429d21a864cffda8e'Michael Niedermayer2014-10-07
|\| | | | | | | | | | | | | | | | | | | * commit '28816050e47b6dba430a52e429d21a864cffda8e': lavf: Set the stream time base hint properly for chained muxers Conflicts: libavformat/segment.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: Set the stream time base hint properly for chained muxersMartin Storsjö2014-10-06
| | | | | | | | | | | | | | This avoids warnings about using the codec time base as time base hint. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '803e82276b3716bf6012ec69e8854dae14a4fd2b'Michael Niedermayer2014-09-08
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit '803e82276b3716bf6012ec69e8854dae14a4fd2b': libavformat: Check mkdir return error codes Conflicts: libavformat/hdsenc.c libavformat/smoothstreamingenc.c See: c89f8f80cc83622471eaf99e451e78df68475e19 See: a3886ea3c5947ca05bfe01b053d9ce2f9725d9eb Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * libavformat: Check mkdir return error codesMartin Storsjö2014-09-07
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the returned error codes were intentionally ignored (see fadd3a68213), to avoid aborting if the directory already existed. If the mkdir actually failed, this was caught when opening files within the directory fails anyway. By handling the error code here (but explicitly ignoring EEXIST), the error messages and return codes in these cases are more appropriate and less confusing. Signed-off-by: Martin Storsjö <martin@martin.st>
| * smoothstreamingenc: Fix a memory leak on errorsMichael Niedermayer2014-07-07
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Use new av_dict_set_int helper function.Reimar Döffinger2014-08-16
| | | | | | | | | | | | | | Get rid of the many, slightly differing, implementations of basically the same thing. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
* | avformat/mux: support re-interleaving packets in ff_write_chained()Michael Niedermayer2014-07-24
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/smoothstreamingenc: fix memleakMichael Niedermayer2014-07-06
| | | | | | | | | | Fixes CID1224285 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/smoothstreamingenc: Use av_mallocz_array()Michael Niedermayer2014-06-15
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'e0d01dc7d7fc3ce4c23f286a10870e9599c8b8b9'Michael Niedermayer2014-05-25
|\| | | | | | | | | | | | | * commit 'e0d01dc7d7fc3ce4c23f286a10870e9599c8b8b9': smoothstream: check malloc calls Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * smoothstream: check malloc callsNidhi Makhijani2014-05-24
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | 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 '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>