summaryrefslogtreecommitdiffstats
path: root/libavformat/wavenc.c
Commit message (Collapse)AuthorAgeFilesLines
* avformat/wavenc: skip writing incorrect peak-of-peaks position valueTobias Rapp2017-10-261-10/+1
| | | | | | | | | | | | | | According to EBU tech 3285 supplement 3 the dwPosPeakOfPeaks field should contain the absolute position to the maximum audio sample value, but the current implementation writes the relative peak frame index instead. Fix the issue by writing the "unknown" value (-1) for now until the feature is implemented correctly. Previous version reviewed-by: Peter Bubestinger <p.bubestinger@av-rd.com> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
* avformat/wavenc: replace literal numbers with enum constantsTobias Rapp2017-10-051-4/+4
| | | | Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
* Merge commit '83548fe894cdb455cc127f754d09905b6d23c173'James Almer2017-03-211-4/+4
|\ | | | | | | | | | | | | * commit '83548fe894cdb455cc127f754d09905b6d23c173': lavf: fix usage of AVIOContext.seekable Merged-by: James Almer <jamrial@gmail.com>
| * lavf: fix usage of AVIOContext.seekableAnton Khirnov2016-09-301-2/+2
| | | | | | | | | | | | | | | | 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.
* | Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-101-25/+27
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/wavenc: use AV_OPT_TYPE_BOOL for write_bext optionPaul B Mahol2015-09-111-1/+1
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | lavf/wav: Print an error if files >4G are written.Carl Eugen Hoyos2015-05-171-2/+6
| | | | | | | | | | | | Additionally, don't write an incorrect shorter size for such files. Fixes part of ticket #4543.
* | avformat/wavenc: Check umid lengthMichael Niedermayer2015-05-101-1/+1
| | | | | | | | | | | | Fixes potential out of array read Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/wavenc: fix string length variable typesMichael Niedermayer2015-05-101-3/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/wavenc: Change enum to int, which is accessed via AVOption as intMichael Niedermayer2015-03-301-1/+1
| | | | | | | | | | | | This fixes depending on implementation defined behavior Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/wavenc: check return value of strftime()Michael Niedermayer2014-12-091-5/+12
| | | | | | | | | | | | Fixes CID1257006 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/wavenc: Use localtime_r() for thread safteyMichael Niedermayer2014-11-021-1/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/wavenc: use av_mallocz_array()Paul B Mahol2014-07-111-2/+2
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | avformat/wavenc: simplify malloc failure checkingMichael Niedermayer2014-06-241-6/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/wavenc: more specific error return for "Writing 16 bit peak for 8 ↵Michael Niedermayer2014-06-241-1/+1
| | | | | | | | | | | | bit audio" Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/wavenc: do not hardcode array size in memset and other functionsMichael Niedermayer2014-06-241-3/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/wavenc: use the bitexact flag from avformat instead of the one from ↵Michael Niedermayer2014-06-241-1/+1
| | | | | | | | | | | | avcodec Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Peak Envelope Chunk encoder: IndentGeorg Lippitsch2014-06-241-14/+14
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | EBU Tech 3285 - Supplement 3 - Peak Envelope Chunk encoderGeorg Lippitsch2014-06-241-1/+243
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'd246231e4714119faac6c7acd881d3b687bb8b11'Michael Niedermayer2014-05-181-2/+3
|\ \ | |/ | | | | | | | | | | | | | | | | * commit 'd246231e4714119faac6c7acd881d3b687bb8b11': wavenc: use codec descriptors to get the codec name Conflicts: libavformat/wavenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * wavenc: use codec descriptors to get the codec nameAnton Khirnov2014-05-181-2/+3
| | | | | | | | Also, return a proper error code.
| * wavenc: write fact chunk sample count at the correct file positionMichael Niedermayer2012-11-261-4/+5
| | | | | | | | | | | | | | Fixes curruption of metadata in the INFO chunk. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* | Initialize riff and wav size fields to -1 instead of 0.Carl Eugen Hoyos2014-05-031-1/+1
| | | | | | | | | | | | | | WMP doess not play the output files if the fields are set to 0 and not overwritten (using pipe output). Fixes ticket #3346.
* | ff_put_wav_header: add flag to force WAVEFORMATEXDaniel Verkamp2014-04-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Partially undoes commit 2c4e08d89327595f7f4be57dda4b3775e1198d5e: riff: always generate a proper WAVEFORMATEX structure in ff_put_wav_header A new flag, FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX, is added to force the use of WAVEFORMATEX rather than PCMWAVEFORMAT even for PCM codecs. This flag is used in the Matroska muxer (the cause of the original change) and in the ASF muxer, because the specifications for these formats indicate explicitly that WAVEFORMATEX should be used. Muxers for other formats will return to the original behavior of writing PCMWAVEFORMAT when writing a header for raw PCM. In particular, this causes raw PCM in WAV to generate the canonical 44-byte header expected by some tools. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/wavenc: check for a single stream.Nicolas George2013-11-031-0/+5
| | | | | | | | Fix trac ticket #3110.
* | WAV muxer: reindentDaniel Verkamp2013-02-131-13/+13
| |
* | WAV muxer: add RF64 supportDaniel Verkamp2013-02-121-6/+67
| |
* | w64: fact guid supportPaul B Mahol2013-01-071-1/+19
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Sony Wave64 muxerPaul B Mahol2012-12-311-0/+84
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | wavenc: fix curruption of metadataMichael Niedermayer2012-10-301-4/+5
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '31c54711cc3f1484af101d629bbb805820d37ad1'Michael Niedermayer2012-10-171-4/+4
|/ | | | | | | | | | * commit '31c54711cc3f1484af101d629bbb805820d37ad1': lavf: split wav muxer and demuxer into separate files. Conflicts: libavformat/wavdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* lavf: split wav muxer and demuxer into separate files.Anton Khirnov2012-10-161-0/+219
OpenPOWER on IntegriCloud