summaryrefslogtreecommitdiffstats
path: root/libavformat/oggenc.c
Commit message (Collapse)AuthorAgeFilesLines
* avformat/oggenc: check for stream private data in ogg_free()James Almer2017-06-221-0/+2
| | | | | | | | | | 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>
* avformat/oggenc: add ogg_init() and ogg_free()James Almer2017-06-181-4/+28
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/oggenc: add vp8 muxing supportJames Almer2016-07-201-10/+89
| | | | | | Addresses ticket #5687 Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: add an Ogg Video muxerJames Almer2016-07-201-1/+23
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/oggenc: fix page duration calculation when granule differs from ↵James Almer2016-07-191-3/+3
| | | | | | | timestamp Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/oggenc: always use the time base stored in the theora headerJames Almer2016-07-121-0/+8
| | | | | | | Fixes ticket #5704 Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/oggenc: make flac the default for oga muxerJames Almer2016-07-111-2/+1
| | | | | | | | | | 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>
* Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-101-40/+40
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-40/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * ogg: check memory allocationsFederico Tomassetti2015-02-151-0/+2
| | | | | | | | | | | | | | Bug-Id: CID 1257795 CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | avformat/oggenc: Check segments_count for headers tooMichael Niedermayer2015-08-271-4/+7
| | | | | | | | | | | | | | Fixes infinite loop and segfault in ogg_buffer_data() Fixes Ticket4806 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/oggenc: Fix return code in case of flushingMichael Niedermayer2015-06-091-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/oggenc: Check ff_vorbiscomment_length in ogg_write_vorbiscomment()Michael Niedermayer2015-05-111-2/+4
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'daf8cf358a098a903d59adb6c0d0cc3262a8c93e'Michael Niedermayer2015-02-141-3/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-141-3/+3
| |
* | avformat/oggenc: Simplify by using OFFSET and PARAMMichael Niedermayer2015-02-011-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'f726fc21ef76a8ba3445448066f7b2a687fbca16'Michael Niedermayer2015-02-011-1/+4
|\ \ | |/ | | | | | | | | | | | | | | | | * commit 'f726fc21ef76a8ba3445448066f7b2a687fbca16': ogg: Provide an option to offset the serial number Conflicts: libavformat/oggenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * ogg: Provide an option to offset the serial numberLuca Barbato2015-02-011-1/+4
| | | | | | | | | | The ogg serial number doubles as codec id and sequence value for concatenated samples.
* | avcodec/xiph: mark returned header pointers const from ↵Michael Niedermayer2014-12-141-1/+1
| | | | | | | | | | | | | | avpriv_split_xiph_headers() Reviewed-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/oggenc: use meaningful error codesLukasz Marek2014-12-031-5/+5
| | | | | | | | Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
* | Merge commit 'e839de0f851535b5e19256b52f9865f0cb768a7c'Michael Niedermayer2014-11-061-5/+3
|\ \ | |/ | | | | | | | | | | * commit 'e839de0f851535b5e19256b52f9865f0cb768a7c': oggenc: accept only STREAMINFO extradata Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * oggenc: accept only STREAMINFO extradataAnton Khirnov2014-11-061-5/+3
| | | | | | | | | | The reasoning is the same as for 0097cbea695e534fce39958ccd103af2fbf65831.
| * oggenc: remove unneeded null checkMichael Niedermayer2014-10-291-1/+1
| | | | | | | | | | | | | | The code would have segfaulted before if oggstream were NULL. CC: libav-stable@libav.org Bug-Id: CID 732218
* | Merge commit 'eabdc2a830f1ab1a3f12243eb7e2fba801cb81f0'Michael Niedermayer2014-10-141-1/+4
|\ \ | |/ | | | | | | | | | | | | | | | | * commit 'eabdc2a830f1ab1a3f12243eb7e2fba801cb81f0': lavf: use initial_padding instead of deprecated delay Conflicts: libavformat/matroskaenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: use initial_padding instead of deprecated delayAnton Khirnov2014-10-131-1/+4
| |
* | Merge commit 'f9f34cb9983ec6f4ef119c34b726d3b39c143110'Michael Niedermayer2014-08-231-28/+12
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit 'f9f34cb9983ec6f4ef119c34b726d3b39c143110': ogg: Use separate classes for the aliases Conflicts: libavformat/oggenc.c See: 2ccc6ff03acc3ca31db1aeb828c747d05b5cb6aa Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * ogg: Use separate classes for the aliasesLuca Barbato2014-08-231-9/+13
| | | | | | | | Unbreak 051aadeed104ecbe8ee4850ec2d7e5394f5e1ccd
* | Merge commit '051aadeed104ecbe8ee4850ec2d7e5394f5e1ccd'Michael Niedermayer2014-08-221-18/+16
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | * 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>
| * ogg: Provide aliases for Speex, Opus and audio-only oggLuca Barbato2014-08-221-1/+52
| | | | | | | | Since they are aliases for ogg enabling any of them enables ogg as well.
* | Merge commit '194be1f43ea391eb986732707435176e579265aa'Michael Niedermayer2014-06-181-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * lavf: switch to AVStream.time_base as the hint for the muxer timebaseAnton Khirnov2014-06-181-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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).
| * oggenc: Set the right AVOption size for the pref_duration optionMartin Storsjö2014-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge commit '95b7fa1729b93bbb3f4fb85a5c0cb53cf970c3c7'Michael Niedermayer2014-06-041-2/+19
|\ \ | |/ | | | | | | | | | | | | | | | | * commit '95b7fa1729b93bbb3f4fb85a5c0cb53cf970c3c7': oggenc: Support flushing the muxer Conflicts: libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * oggenc: Support flushing the muxerMartin Storsjö2014-06-041-2/+19
| | | | | | | | | | | | | | | | | | 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>
| * oggenc: Fix the EOS flagMichael Niedermayer2014-05-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge commit 'efcde917af407a6031ecff68edd51fce7b83d104'Michael Niedermayer2014-05-281-3/+2
|\ \ | |/ | | | | | | | | | | | | | | | | * commit 'efcde917af407a6031ecff68edd51fce7b83d104': vorbiscomment: simplify API by using av_dict_count() Conflicts: libavformat/flacenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * vorbiscomment: simplify API by using av_dict_count()Anton Khirnov2014-05-281-3/+2
| |
* | avformat/oggenc: fix EOS flagMichael Niedermayer2014-05-281-2/+2
| | | | | | | | | | | | | | This corrects the bug that caused the checksums to change in 9767d7c092c890ecc5953452e8a951fd902dd67b Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '9767d7c092c890ecc5953452e8a951fd902dd67b'Michael Niedermayer2014-05-281-0/+2
|\ \ | |/ | | | | | | | | | | | | | | | | * commit '9767d7c092c890ecc5953452e8a951fd902dd67b': oggenc: Flush after writing headers Conflicts: tests/ref/lavf/ogg Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * oggenc: Flush after writing headersAndrew Kelley2014-05-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge commit '1d3eb0b5735f6dd72d2bf648455cf06ac7c24bc1'Michael Niedermayer2014-05-281-22/+22
|\ \ | |/ | | | | | | | | | | * commit '1d3eb0b5735f6dd72d2bf648455cf06ac7c24bc1': oggenc: Move ogg_write_pages up above ogg_write_header Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * oggenc: Move ogg_write_pages up above ogg_write_headerAndrew Kelley2014-05-271-22/+22
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '0c1959b056f6ccaa2eee2c824352ba93c8e36d52'Michael Niedermayer2014-05-151-5/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * lavf: add AVFMT_FLAG_BITEXACT.Anton Khirnov2014-05-151-5/+5
| | | | | | | | | | | | | | | | 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.
* | oggenc: check return value of av_mallocz()James Almer2014-04-041-0/+3
| | | | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Add an .oga muxer.Carl Eugen Hoyos2014-03-251-0/+24
| |
* | Merge commit 'b0c2c097e422b9e10a7d856582f8321d28af821e'Michael Niedermayer2014-02-091-1/+2
|\ \ | |/ | | | | | | | | | | * commit 'b0c2c097e422b9e10a7d856582f8321d28af821e': lavf: default .ogg audio to libvorbis if we can Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: default .ogg audio to libvorbis if we canAndrew Kelley2014-02-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Add an Opus and a Speex muxer.Carl Eugen Hoyos2013-12-011-9/+65
| | | | | | | | Fixes ticket #3181.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-11-241-0/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: Add missing #includes for *INT64_MAX and *INT64_C Conflicts: ffmpeg.c ffmpeg_filter.c ffplay.c libavformat/assdec.c libavformat/avidec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
OpenPOWER on IntegriCloud