summaryrefslogtreecommitdiff
path: root/libavformat/asfenc.c
Commit message (Collapse)AuthorAge
* avformat/avlanguage: make av_convert_lang_to() internalJames Almer2016-07-19
| | | | | | | The header was never installed and the function is only used in libavformat Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-21
|\ | | | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * asfenc: remove an unused variableAnton Khirnov2016-03-05
| |
| * asfenc: fix some possible integer overflowsAnton Khirnov2016-03-05
| | | | | | | | | | | | | | | | | | | | Store the file duration in the same timebase it arrives (i.e. milliseconds) and only convert it to the file duration units (100ns) when it's actually written, thus simplifying some calculations. Also, store the duration as unsigned, since it cannot be negative. CC: libav-stable@libav.org Bug-ID: CVE-2016-2326
* | 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/asfenc: write group_mutual_exclusion_objects for audio on multiple ↵Marton Balint2016-02-21
| | | | | | | | | | | | | | | | | | | | | | | | languages Improves streaming compatibility with Windows Media Services. Also tested for compatilbility in Windows Media Player, Windows Media ASF Viewer and VLC. This version of the patch only writes exclusion among audio streams, therefore choosing a subtitle language should be possible independently of audio language. Signed-off-by: Marton Balint <cus@passwd.hu>
* | avformat/asfenc: use ff_parse_creation_time_metadataMarton Balint2016-02-14
| | | | | | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* | lavf/asfenc: add support for setting packet sizeMarton Balint2016-02-05
| | | | | | | | | | | | | | This can provide a manual workaround for ticket #4230. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
* | lavf/asfenc: add support for storing creation timeMarton Balint2016-02-05
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
* | lavf/asfenc: add support for storing languagesMarton Balint2016-02-05
| | | | | | | | | | | | | | | | Checked compatiblity with VLC, Windows Media Player 12 and Windows Media ASF Viewer 9 series. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
* | lavf/asfenc: check the number of streams in headerMarton Balint2016-02-05
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
* | lavf/asfenc: add AVClass to contextMarton Balint2016-02-05
| | | | | | | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
* | avformat/asfenc: Check ptsMichael Niedermayer2016-01-12
| | | | | | | | | | | | | | | | Fixes integer overflow Fixes: 0063df8be3aaa30dd6d76f59c8f818c8/signal_sigsegv_7b7b59_3634_bf418b6822bbfa68734411d96b667be3.mov Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/asfenc: Flush packet before duration becomes unrepresentableMichael Niedermayer2016-01-12
| | | | | | | | | | | | | | | | Fixes: 0063df8be3aaa30dd6d76f59c8f818c8/signal_sigsegv_7b7b59_3634_bf418b6822bbfa68734411d96b667be3.mov Fixes assertion failure Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit 'b08569a23948db107e5e6175cd4c695427d5339d'Michael Niedermayer2015-06-28
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'b08569a23948db107e5e6175cd4c695427d5339d': lavf: Replace the ASF demuxer Conflicts: Changelog libavformat/asf.h libavformat/asfdec.c libavformat/version.h tests/ref/fate/wmv8-drm-nodec tests/ref/seek/lavf-asf The rewritten demuxer is placed in a new file, the current demuxer is left as default. Carl has tested both and the one working better is default. Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: Replace the ASF demuxerAlexandra Hájková2015-06-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old one is the result of the reverse engineering and guesswork. The new one has been written following the now-available specification. This work is part of Outreach Program for Women Summer 2014 activities for the Libav project. The fate references had to be changed because the old demuxer truncates the last frame in some cases, the new one handles it properly. The seek-test reference is changed because seeking works differently in the new demuxer. When seeking, the packet is not read from the stream directly, but it is rather constructed by the demuxer. That is why position is -1 now in the reference. Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * asfenc: fix leaking asf->index_ptr on errorAndreas Cadhalpun2015-03-11
| | | | | | | | | | Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | avformat/asfenc: Check for index_ptr allocation failureMichael Niedermayer2015-04-07
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | asfenc: fix leaking asf->index_ptr on errorAndreas Cadhalpun2015-03-09
| | | | | | | | | | Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | 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
| |
* | avformat/asfenc: remove unneeded #include, there are no assert() only av_assert*Paul B Mahol2015-01-31
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | avformat/asfenc: replace != 0 error check by <0Michael Niedermayer2014-12-20
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/asfenc: Make asf_write_indexs index argument constMichael Niedermayer2014-09-22
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/asfenc: honor the maximum of 63 payloadsAaron Graham2014-05-13
| | | | | | | | | | | | Fixes Ticket3634 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '6072184e702b4b631ac72f1b66b75e5f21e0ce2d'Michael Niedermayer2014-05-01
|\| | | | | | | | | | | | | | | | | | | | | * commit '6072184e702b4b631ac72f1b66b75e5f21e0ce2d': asfenc: use codec descriptors instead of AVCodecs to write codec info Conflicts: tests/ref/lavf/asf tests/ref/seek/lavf-asf Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * asfenc: use codec descriptors instead of AVCodecs to write codec infoAnton Khirnov2014-05-01
| | | | | | | | | | | | | | | | Also, stop using AVCodecContext.codec_name as fallback, since it will be deprecated. Changes the result of the lavf-asf test (and its associated seektest), since 'msmpeg4v3' gets written instead of just 'msmpeg4'.
* | ff_put_wav_header: add flag to force WAVEFORMATEXDaniel Verkamp2014-04-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Never write 0 as maximum bitrate for asf files.Carl Eugen Hoyos2014-04-24
| | | | | | | | WMP refuses to play such streams.
* | avformat/asfenc: dont allow non interleaved packetsMichael Niedermayer2014-04-21
| | | | | | | | | | | | The muxer does not support this currently Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Write sample_aspect_ratio to asf files.Carl Eugen Hoyos2014-04-17
| | | | | | | | Fixes ticket #3528.
* | Move GUID-related objects to riffenc.c and riff.c.Carl Eugen Hoyos2014-01-29
| | | | | | | | This simplifies the following eac3-in-wav patch.
* | riffenc: add option to ff_put_bmp_header to ignore extradataPeter Ross2013-12-23
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'bb461370e34b1fa1637f34ce7d37b934ddb472d5'Michael Niedermayer2013-09-20
|\| | | | | | | | | | | | | | | | | | | | | * commit 'bb461370e34b1fa1637f34ce7d37b934ddb472d5': asfenc: mux chapters in ASF files using an ASF "marker" section Conflicts: Changelog libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * asfenc: mux chapters in ASF files using an ASF "marker" sectionVladimir Pantelic2013-09-19
| | | | | | | | | | | | | | | | ASF markers only have a start time, so we lose the chapter end times, but that is ASF for you Signed-off-by: Vladimir Pantelic <vladoman@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit '09f3c937ed6fd7c5bd64450d45f73b0f4975f4c9'Michael Niedermayer2013-09-20
|\| | | | | | | | | | | | | | | | | | | * commit '09f3c937ed6fd7c5bd64450d45f73b0f4975f4c9': asfenc: remember send time and offset of the index entries Conflicts: libavformat/asfenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * asfenc: remember send time and offset of the index entriesVladimir Pantelic2013-09-19
| | | | | | | | | | Signed-off-by: Vladimir Pantelic <vladoman@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit 'c53b5dda352452e79a9e962cd4c74c813186d9ed'Michael Niedermayer2013-09-20
|\| | | | | | | | | | | | | * commit 'c53b5dda352452e79a9e962cd4c74c813186d9ed': asfdec: replace magic constant with DATA_HEADER_SIZE Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * asfdec: replace magic constant with DATA_HEADER_SIZEVladimir Pantelic2013-09-19
| | | | | | | | | | Signed-off-by: Vladimir Pantelic <vladoman@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | avformat/asfenc: fix a build errorChih-Wei Huang2013-09-17
| | | | | | | | | | | | It's introduced by the erroneous merging commit cbe47b1e. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/asfenc: use av_freep() for extra safteyMichael Niedermayer2013-09-11
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'f369b9356c4606cd4d713d60f7db5de119d901fa'Michael Niedermayer2013-09-11
|\| | | | | | | | | | | | | | | | | | | | | | | * commit 'f369b9356c4606cd4d713d60f7db5de119d901fa': avformat: Use av_reallocp_array() where suitable Conflicts: libavformat/asfenc.c libavformat/gxfenc.c libavformat/mov.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Use av_reallocp_array() where suitableAlexandra Khirnova2013-09-10
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | asfenc: convert asserts to av_assertMichael Niedermayer2013-04-07
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '2c328a907978b61949fd20f7c991803174337855'Michael Niedermayer2013-03-20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '2c328a907978b61949fd20f7c991803174337855': pixdesc: add a function for counting planes in a pixel format. avplay: remove the -debug option. Revert "asfenc: return error on negative timestamp" Conflicts: doc/APIchanges doc/ffplay.texi ffplay.c libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Revert "asfenc: return error on negative timestamp"Anton Khirnov2013-03-19
| | | | | | | | | | This reverts commit d1bec33b46091546c5b2e6815210e73f87abf413, it breaks FATE.
* | Merge commit '50c449ac24fbb4c03c15d2e2026cef2204b80385'Michael Niedermayer2013-03-18
|\| | | | | | | | | | | | | | | | | | | | | * commit '50c449ac24fbb4c03c15d2e2026cef2204b80385': iff: validate CMAP palette size asfenc: return error on negative timestamp Conflicts: libavformat/iff.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * asfenc: return error on negative timestampLuca Barbato2013-03-18
| | | | | | | | | | | | | | According to the specification the timestamp is represented by a 32bit unsigned. CC: libav-stable@libav.org