summaryrefslogtreecommitdiff
path: root/libavformat/mp3enc.c
Commit message (Collapse)AuthorAge
* avformat/mp3enc: add init and deinit functionsJames Almer2019-10-21
| | | | | Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mp3enc: Avoid SEEK_END as it is unsupportedMichael Niedermayer2019-05-27
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mp3enc: use AVPacketList helper functions to queue packetsJames Almer2018-04-04
| | | | | | | Simplifies code. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mp3enc: flush buffered packets if referencing failsJames Almer2017-10-06
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: replace all uses of av_copy_packet()James Almer2017-09-25
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* Fix all -Wformat warnings raised by DJGPPClément Bœsch2017-03-29
|
* Merge commit '83548fe894cdb455cc127f754d09905b6d23c173'James Almer2017-03-21
|\ | | | | | | | | | | | | * commit '83548fe894cdb455cc127f754d09905b6d23c173': lavf: fix usage of AVIOContext.seekable Merged-by: James Almer <jamrial@gmail.com>
| * lavf: fix usage of AVIOContext.seekableAnton Khirnov2016-09-30
| | | | | | | | | | | | | | | | It is supposed to be a flag. The only currently defined value is AVIO_SEEKABLE_NORMAL, but other ones may be added in the future. However all the current lavf code treats this field as a bool (mainly for historical reasons). Change all those cases to properly check for AVIO_SEEKABLE_NORMAL.
| * mp3enc: write trailing paddingAnton Khirnov2016-07-15
| |
* | Merge commit 'e72d6fa08a3c1876109149401753a8d2c736d418'Hendrik Leppkes2016-11-14
|\| | | | | | | | | | | | | * commit 'e72d6fa08a3c1876109149401753a8d2c736d418': build: Move MP2 muxer declaration away from MP3 muxer code Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * build: Move MP2 muxer declaration away from MP3 muxer codeDiego Biurrun2016-06-29
| | | | | | | | The MP2 muxer uses none of the code of the MP3 muxer.
* | lavf/mp3enc: write encoder delay/padding upon closingJon Toohill2016-10-18
| | | | | | | | Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | 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.
* | avformat/mp3enc: Assert that the header we assembled is validMichael Niedermayer2016-02-07
| | | | | | | | | | | | | | | | | | | | Silences: CID1351343 The header is calculated by the code above the changed hunk, it is thus asserted that the header is always correct. Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '955aec3c7c7be39b659197e1ec379a09f2b7c41c'Hendrik Leppkes2016-01-01
|\| | | | | | | | | | | | | * commit '955aec3c7c7be39b659197e1ec379a09f2b7c41c': mpegaudiodecheader: check the header in avpriv_mpegaudio_decode_header Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * mpegaudiodecheader: check the header in avpriv_mpegaudio_decode_headerAnton Khirnov2015-12-12
| | | | | | | | | | | | Almost all the places from which this function is called already check the header manually and in the two that don't (the mp3 muxer) the check should not cause any problems.
* | avformat: use AV_OPT_TYPE_BOOL in a bunch of placesClément Bœsch2015-12-04
| |
* | Merge commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457'Hendrik Leppkes2015-10-27
|\| | | | | | | | | | | | | * commit 'ce70f28a1732c74a9cd7fec2d56178750bd6e457': avpacket: Replace av_free_packet with av_packet_unref Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * avpacket: Replace av_free_packet with av_packet_unrefLuca Barbato2015-10-26
| | | | | | | | | | | | | | `av_packet_unref` matches the AVFrame ref-counted API and can be used as a drop in replacement. Deprecate `av_free_packet`.
| * Drop the unofficial extension prefix for MPEG and MPEG-TS formatsFlorent Le Coz2014-12-02
| | | | | | | | | | | | | | | | As per the RFCs: http://tools.ietf.org/html/rfc3555#page-38 http://tools.ietf.org/html/rfc3003 CC: libav-stable@libav.org
* | id3v2: prefer TDRC for date over TDRL.Benoit Fouet2014-11-04
| | | | | | | | | | | | | | | | | | | | | | | | | | TDRL is what we used as a replacement of TYER, and, according to http://id3.org/id3v2.4.0-changes : TYER - Year This frame is replaced by the TDRC frame, 'Recording time' [F:4.2.5]. So change TDRL usages to TDRC. Fixes ticket #3694 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mp3enc: Squeeze our mp3 encoder tag into the 9byte shortname ↵Michael Niedermayer2014-10-24
| | | | | | | | | | | | instead of randomly truncating Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'ef363ebd596da18f889a7d4845023a23dfac84c9'Michael Niedermayer2014-10-24
|\| | | | | | | | | | | | | | | | | | | * commit 'ef363ebd596da18f889a7d4845023a23dfac84c9': mp3enc: write full LAME frame Conflicts: libavformat/mp3enc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mp3enc: write full LAME frameAnton Khirnov2014-10-24
| | | | | | | | Most importantly, it contains the encoder delay and replaygain info.
* | avformat/mp3enc: use initial_paddingMichael Niedermayer2014-10-14
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/mp3enc: don't abort if audio packets can't be bufferedJames Almer2014-08-27
| | | | | | | | | | | | | | Instead skip the picture streams and flush the queued audio packets. Should address ticket #3851. Signed-off-by: James Almer <jamrial@gmail.com>
* | Merge commit 'f2f2e7627f0c878d13275af5d166ec5932665e28'Michael Niedermayer2014-06-23
|\| | | | | | | | | | | | | | | | | | | | | * commit 'f2f2e7627f0c878d13275af5d166ec5932665e28': Check mp3 header before calling avpriv_mpegaudio_decode_header(). Conflicts: libavformat/mp3enc.c See: 2dd0da787ce5008d4d1b8f461fbd1288c32e2c38 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Check mp3 header before calling avpriv_mpegaudio_decode_header().Justin Ruggles2014-06-22
| | | | | | | | | | | | | | | | As indicated in the function documentation, the header MUST be checked prior to calling it because no consistency check is done there. CC:libav-stable@libav.org
* | Fix the mime types for MPEG and MPEG-TS formatsFlorent Le Coz2014-05-22
| | | | | | | | | | | | As per the RFCs: http://tools.ietf.org/html/rfc3555#page-38 http://tools.ietf.org/html/rfc3003
* | avformat/mp3enc: switch to AVFMT_FLAG_BITEXACTMichael Niedermayer2014-05-18
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mp3enc: drop redundant and uninitialized variableMichael Niedermayer2014-04-13
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '617a1a98a6be3e59db6fbfc21afab2fb9a049c03'Michael Niedermayer2014-04-12
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit '617a1a98a6be3e59db6fbfc21afab2fb9a049c03': mp3enc: Properly write bitrate value in XING header Conflicts: libavformat/mp3enc.c See: 40176fc3149bc72c1309f93989a57aec2322e626 See: d62bf5d4e73250295c0a652e151498c5b19cbd63 See: various others Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mp3enc: Properly write bitrate value in XING headerMichael Niedermayer2014-04-12
| | | | | | | | | | | | | | | | | | | | | | | | Instead of using a fixed bitrate_idx, calculate a matching bitrate for the XING header. Using a fixed bitrate_idx causes tools such as file(1) and mediainfo(1) to report wrong bitrate and bitrate mode when using CBR. Bug-Id: https://bugs.debian.org/736088 Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | avformat/mp3enc: use av_copy_packet()Michael Niedermayer2014-03-22
| | | | | | | | | | | | | | Fixes double free Fixes Ticket3476 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/id3v2enc: use metadata_header_paddingJames Darnley2014-01-24
| | | | | | | | | | | | | | As with the change to flacenc this allows the user to control the amount of padding they want added to the file. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '33018907bd07b34e0e70d5ae12097265eb3734d7'Michael Niedermayer2014-01-17
|\| | | | | | | | | | | | | | | | | | | | | * commit '33018907bd07b34e0e70d5ae12097265eb3734d7': mp3enc: allow omitting the id3v2 header with -id3v2_version 0 Conflicts: doc/muxers.texi libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mp3enc: allow omitting the id3v2 header with -id3v2_version 0Anton Khirnov2014-01-17
| |
* | Merge commit 'f9cc6883a4e5cf72cbfa21d17e1908a2a432f6bd'Michael Niedermayer2014-01-17
|\| | | | | | | | | | | | | | | | | | | | | * commit 'f9cc6883a4e5cf72cbfa21d17e1908a2a432f6bd': mp3enc: add an option for disabling the Xing frame. Conflicts: doc/muxers.texi libavformat/mp3enc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mp3enc: add an option for disabling the Xing frame.Anton Khirnov2014-01-17
| |
* | avformat: remove duplicate includesMichael Niedermayer2013-09-21
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'c0779a67e85df856904ee6fab760c4233d4c2be5'Michael Niedermayer2013-09-12
|\| | | | | | | | | | | | | | | | | | | * commit 'c0779a67e85df856904ee6fab760c4233d4c2be5': mp3: add .mpa extension Conflicts: libavformat/mp3dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mp3: add .mpa extensionVittorio Giovara2013-09-12
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit '1afddbe59e96af75f1c07605afc95615569f388f'Michael Niedermayer2013-03-08
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '1afddbe59e96af75f1c07605afc95615569f388f': avpacket: use AVBuffer to allow refcounting the packets. Conflicts: libavcodec/avpacket.c libavcodec/utils.c libavdevice/v4l2.c libavformat/avidec.c libavformat/flacdec.c libavformat/id3v2.c libavformat/matroskaenc.c libavformat/mux.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avpacket: use AVBuffer to allow refcounting the packets.Anton Khirnov2013-03-08
| | | | | | | | | | | | This will allow us to avoid copying the packets in many cases. This breaks ABI.
* | lavf/mp3enc: make sure the header is valid before writing audio pkt.Clément Bœsch2012-11-16
| | | | | | | | | | An invalid header can lead avpriv_mpegaudio_decode_header() to overread and/or div by zero.
* | mp3enc: remove unneeded null ptr checkMichael Niedermayer2012-10-16
| | | | | | | | | | Fixes: CID733746 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mp3enc: fix signed C99 overflowMichael Niedermayer2012-10-14
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mp3enc: merge mp2/mp3_write_trailerMichael Niedermayer2012-09-16
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mp3enc: move mp3_update_xing() downMichael Niedermayer2012-09-16
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>