Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-05-20avformat/oggenc: Don't free AVStream's priv_data, fix memleakAndreas Rheinhardt
For FLAC, Speex, Opus and VP8 the Ogg muxer allocates two buffers for building the headers: The first for extradata in an Ogg-specific format and the second contains a Vorbiscomment. These buffers are reachable via pointers in the corresponding AVStream's priv_data. If an error happens during building the headers, the AVStream's priv_data would be freed. This is pointless in general as it would be freed generically anyway, but here it is actively harmful: If the second of the aforementioned allocations fails, the first buffer would leak upon freeing priv_data. This commit stops freeing priv_data manually, which allows the muxer to properly clean up in the deinit function. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> (cherry picked from commit 0fcf74f4357e949f5971d39b04a128103b8949bb)
2018-12-18avformat/vorbiscomment: add support for writing chaptersPaul B Mahol
Fixes #7532.
2017-06-22avformat/oggenc: check for stream private data in ogg_free()James Almer
Fixes a NULL pointer derefence when ogg_init() returns a failure and a stream's private data was not yet allocated. This is a regression since 3c5a53cdfa099bba8bd951f95b85727b4b3b5d68 Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
2017-06-19avformat/oggenc: add ogg_init() and ogg_free()James Almer
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
2016-07-21avformat/oggenc: add vp8 muxing supportJames Almer
Addresses ticket #5687 Signed-off-by: James Almer <jamrial@gmail.com>
2016-07-21avformat: add an Ogg Video muxerJames Almer
Signed-off-by: James Almer <jamrial@gmail.com>
2016-07-20avformat/oggenc: fix page duration calculation when granule differs from ↵James Almer
timestamp Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
2016-07-12avformat/oggenc: always use the time base stored in the theora headerJames Almer
Fixes ticket #5704 Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
2016-07-11avformat/oggenc: make flac the default for oga muxerJames Almer
This allows simpler selection of flac in ogg from the command line, while following the RFC 5334 recommendation[1] for the oga extension. [1] https://tools.ietf.org/html/rfc5334#section-10.3 Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
2016-04-10Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis
* 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>
2016-02-23lavf: replace AVStream.codec with AVStream.codecparAnton Khirnov
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.
2015-08-27avformat/oggenc: Check segments_count for headers tooMichael Niedermayer
Fixes infinite loop and segfault in ogg_buffer_data() Fixes Ticket4806 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-06-09avformat/oggenc: Fix return code in case of flushingMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-11avformat/oggenc: Check ff_vorbiscomment_length in ogg_write_vorbiscomment()Michael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-15ogg: check memory allocationsFederico Tomassetti
Bug-Id: CID 1257795 CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-02-14Merge commit 'daf8cf358a098a903d59adb6c0d0cc3262a8c93e'Michael Niedermayer
* 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>
2015-02-14avformat: Don't anonymously typedef structsDiego Biurrun
2015-02-01avformat/oggenc: Simplify by using OFFSET and PARAMMichael Niedermayer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-01Merge commit 'f726fc21ef76a8ba3445448066f7b2a687fbca16'Michael Niedermayer
* commit 'f726fc21ef76a8ba3445448066f7b2a687fbca16': ogg: Provide an option to offset the serial number Conflicts: libavformat/oggenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-01ogg: Provide an option to offset the serial numberLuca Barbato
The ogg serial number doubles as codec id and sequence value for concatenated samples.
2014-12-14avcodec/xiph: mark returned header pointers const from ↵Michael Niedermayer
avpriv_split_xiph_headers() Reviewed-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-04lavf/oggenc: use meaningful error codesLukasz Marek
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-11-06Merge commit 'e839de0f851535b5e19256b52f9865f0cb768a7c'Michael Niedermayer
* commit 'e839de0f851535b5e19256b52f9865f0cb768a7c': oggenc: accept only STREAMINFO extradata Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-06oggenc: accept only STREAMINFO extradataAnton Khirnov
The reasoning is the same as for 0097cbea695e534fce39958ccd103af2fbf65831.
2014-10-29oggenc: remove unneeded null checkMichael Niedermayer
The code would have segfaulted before if oggstream were NULL. CC: libav-stable@libav.org Bug-Id: CID 732218
2014-10-14Merge commit 'eabdc2a830f1ab1a3f12243eb7e2fba801cb81f0'Michael Niedermayer
* commit 'eabdc2a830f1ab1a3f12243eb7e2fba801cb81f0': lavf: use initial_padding instead of deprecated delay Conflicts: libavformat/matroskaenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-13lavf: use initial_padding instead of deprecated delayAnton Khirnov
2014-08-23Merge commit 'f9f34cb9983ec6f4ef119c34b726d3b39c143110'Michael Niedermayer
* commit 'f9f34cb9983ec6f4ef119c34b726d3b39c143110': ogg: Use separate classes for the aliases Conflicts: libavformat/oggenc.c See: 2ccc6ff03acc3ca31db1aeb828c747d05b5cb6aa Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-23ogg: Use separate classes for the aliasesLuca Barbato
Unbreak 051aadeed104ecbe8ee4850ec2d7e5394f5e1ccd
2014-08-22Merge commit '051aadeed104ecbe8ee4850ec2d7e5394f5e1ccd'Michael Niedermayer
* commit '051aadeed104ecbe8ee4850ec2d7e5394f5e1ccd': ogg: Provide aliases for Speex, Opus and audio-only ogg Conflicts: Changelog libavformat/oggenc.c libavformat/version.h See: 2ccc6ff03acc3ca31db1aeb828c747d05b5cb6aa Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-22ogg: Provide aliases for Speex, Opus and audio-only oggLuca Barbato
Since they are aliases for ogg enabling any of them enables ogg as well.
2014-06-18Merge commit '194be1f43ea391eb986732707435176e579265aa'Michael Niedermayer
* commit '194be1f43ea391eb986732707435176e579265aa': lavf: switch to AVStream.time_base as the hint for the muxer timebase Conflicts: doc/APIchanges libavformat/filmstripenc.c libavformat/movenc.c libavformat/mxfenc.c libavformat/oggenc.c libavformat/swf.h libavformat/version.h tests/ref/lavf/mkv Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-18lavf: switch to AVStream.time_base as the hint for the muxer timebaseAnton Khirnov
Previously, AVStream.codec.time_base was used for that purpose, which was quite confusing for the callers. This change also opens the path for removing AVStream.codec. The change in the lavf-mkv test is due to the native timebase (1/1000) being used instead of the default one (1/90000), so the packets are now sent to the crc muxer in the same order in which they are demuxed (previously some of them got reordered because of inexact timestamp conversion).
2014-06-06oggenc: Set the right AVOption size for the pref_duration optionMartin Storsjö
On big endian machines, the default value set via the faulty AVOption ended up as 2^32 times too big. This fixes the fate-lavf-ogg test which currently is broken on big endian machines, broken since 3831362. Since that commit, a final zero-sized packet is written to the ogg muxer in that test, which caused different flushing behaviour on little and big endian depending on whether the pref_duration option was handled as it should or not. CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
2014-06-04Merge commit '95b7fa1729b93bbb3f4fb85a5c0cb53cf970c3c7'Michael Niedermayer
* commit '95b7fa1729b93bbb3f4fb85a5c0cb53cf970c3c7': oggenc: Support flushing the muxer Conflicts: libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-06-04oggenc: Support flushing the muxerMartin Storsjö
This allows the caller to write all buffered data to disk, allowing the caller to know at what byte position in the file a certain packet starts (any packet written after the flush will be located after that byte position). Signed-off-by: Martin Storsjö <martin@martin.st>
2014-05-28oggenc: Fix the EOS flagMichael Niedermayer
This corrects the bug that caused the checksums to change in 9767d7c092c890ecc5953452e8a951fd902dd67b. It caused the EOS flag to be set incorrectly; the ogg spec does not allow it to be set in the middle of a logical bitstream. Signed-off-by: Andrew Kelley <superjoe30@gmail.com> Signed-off-by: Martin Storsjö <martin@martin.st>
2014-05-28Merge commit 'efcde917af407a6031ecff68edd51fce7b83d104'Michael Niedermayer
* commit 'efcde917af407a6031ecff68edd51fce7b83d104': vorbiscomment: simplify API by using av_dict_count() Conflicts: libavformat/flacenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-28vorbiscomment: simplify API by using av_dict_count()Anton Khirnov
2014-05-28avformat/oggenc: fix EOS flagMichael Niedermayer
This corrects the bug that caused the checksums to change in 9767d7c092c890ecc5953452e8a951fd902dd67b Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-28Merge commit '9767d7c092c890ecc5953452e8a951fd902dd67b'Michael Niedermayer
* commit '9767d7c092c890ecc5953452e8a951fd902dd67b': oggenc: Flush after writing headers Conflicts: tests/ref/lavf/ogg Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-28Merge commit '1d3eb0b5735f6dd72d2bf648455cf06ac7c24bc1'Michael Niedermayer
* commit '1d3eb0b5735f6dd72d2bf648455cf06ac7c24bc1': oggenc: Move ogg_write_pages up above ogg_write_header Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-27oggenc: Flush after writing headersAndrew Kelley
Before, header information for ogg format files was sent with the first encoded packet. This patch makes it so that it is possible for API users to differentiate between headers and encoded audio. This is useful, for example, when creating an audio stream where you want to send one set of headers for every client that connects and then the encoded stream of audio. Signed-off-by: Martin Storsjö <martin@martin.st>
2014-05-27oggenc: Move ogg_write_pages up above ogg_write_headerAndrew Kelley
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-05-15Merge commit '0c1959b056f6ccaa2eee2c824352ba93c8e36d52'Michael Niedermayer
* commit '0c1959b056f6ccaa2eee2c824352ba93c8e36d52': lavf: add AVFMT_FLAG_BITEXACT. Conflicts: doc/APIchanges libavformat/avformat.h libavformat/flacenc.c libavformat/movenc.c libavformat/oggenc.c libavformat/options_table.h libavformat/version.h tests/fate/video.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-15lavf: add AVFMT_FLAG_BITEXACT.Anton Khirnov
Use it instead of checking CODEC_FLAG_BITEXACT in the first stream's codec context. Using codec options inside lavf is fragile and can easily break when the muxing codec context is not the encoding context.
2014-04-04oggenc: check return value of av_mallocz()James Almer
Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-25Add an .oga muxer.Carl Eugen Hoyos
2014-02-09Merge commit 'b0c2c097e422b9e10a7d856582f8321d28af821e'Michael Niedermayer
* commit 'b0c2c097e422b9e10a7d856582f8321d28af821e': lavf: default .ogg audio to libvorbis if we can Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-09lavf: default .ogg audio to libvorbis if we canAndrew Kelley
Since 2007, the Xiph.org Foundation recommends that .ogg only be used for Ogg Vorbis audio files. Source: http://wiki.xiph.org/index.php/MIME_Types_and_File_Extensions However we only do it if we have libvorbis available because the built in vorbis encoder is not as good. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>