summaryrefslogtreecommitdiff
path: root/libavformat/asfenc.c
Commit message (Collapse)AuthorAge
* 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
* 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.
* 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: Don't anonymously typedef structsDiego Biurrun2015-02-14
|
* 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'.
* 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>
* 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>
* 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: Use av_reallocp_array() where suitableAlexandra Khirnova2013-09-10
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* Revert "asfenc: return error on negative timestamp"Anton Khirnov2013-03-19
| | | | | This reverts commit d1bec33b46091546c5b2e6815210e73f87abf413, it breaks FATE.
* 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
* asf: K&R formatting cosmeticsDiego Biurrun2013-02-06
|
* lavf: flush the output AVIOContext in av_write_trailer().Anton Khirnov2012-09-15
| | | | | | | This is consistent with stdio and is what we want to do in all cases. Fixes a bug in the voc muxer which didn't flush in write_trailer() previously. This is the cause of the change in the test results.
* dict: add av_dict_count()Mans Rullgard2012-08-10
| | | | | | | | This adds a function to retrieve the number of entries in a dictionary and updates the places directly accessing what should be an opaque struct to use this new function instead. Signed-off-by: Mans Rullgard <mans@mansr.com>
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-07
|
* Improve descriptiveness of a number of codec and container long namesDiego Biurrun2012-07-30
|
* lavf: use conditional notation for default codec in muxer declarations.Ronald S. Bultje2012-07-22
| | | | | This removes the use of macro nesting in these code constructs, which makes it easier to parse in pre-processors.
* cosmetics: Align muxer/demuxer declarationsMartin Storsjö2012-04-06
| | | | | | | Also add missing trailing commas, break long codec_tag lines and add spaces in codec_tag declarations. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: make av_set_pts_info private.Anton Khirnov2011-11-30
| | | | It's supposed to be called only from (de)muxers.
* riff: always generate a proper WAVEFORMATEX structure in ff_put_wav_headerJohn Brooks2011-10-14
| | | | | | | | | | | | | | The cbSize field should be included in all cases, even with PCM where its value is ignored. Fixes encoding PCM audio in Matroska for some players which insist on a full WAVEFORMATEX structure for A_MS/ACM audio. Since fate uses wav files for the audio test a larger number of tests has changed checksums or shifted positions due to the 2 byte longer wave header. Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* lavf: use designated initialisers for all (de)muxers.Anton Khirnov2011-07-17
| | | | It's more readable and less prone to breakage.
* Remove all uses of now deprecated metadata functions.Anton Khirnov2011-06-08
|
* avio: avio_ prefix for url_close_dyn_bufAnton Khirnov2011-04-03
|
* avio: avio_ prefix for url_open_dyn_bufAnton Khirnov2011-04-03
|
* avio: introduce an AVIOContext.seekable fieldAnton Khirnov2011-04-03
| | | | Use it instead of url_is_streamed and AVIOContext.is_streamed.
* Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* avio: rename put_flush_packet -> avio_flushAnton Khirnov2011-03-16
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: add avio_tell macro as a replacement for url_ftellAnton Khirnov2011-03-04
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: avio_ prefix for url_fseekAnton Khirnov2011-03-01
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: avio: avio_ prefixes for put_* functionsAnton Khirnov2011-02-21
| | | | | | | | | | | | In the name of consistency: put_byte -> avio_w8 put_<type> -> avio_w<type> put_buffer -> avio_write put_nbyte will be made private put_tag will be merged with avio_put_str Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: move init_put_byte() to a new private header and rename itAnton Khirnov2011-02-20
| | | | | | | init_put_byte should never be used outside of lavf, since sizeof(AVIOContext) isn't part of public ABI. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* avio: rename ByteIOContext to AVIOContext.Anton Khirnov2011-02-20
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* asf: split ASFContext into muxer and demuxer parts.Anton Khirnov2011-02-09
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* Prefix all _demuxer, _muxer, _protocol from libavformat and libavdevice.Diego Elio Pettenò2011-01-26
| | | | | This also lists the objects from those two libraries as internal (by adding the ff_ prefix) so that they can then be hidden via linker scripts.
* lavf: move ff_put_str16_nolen from asf to avio and rename itAnton Khirnov2011-01-21
| | | | | | It will be useful in the mp3 muxer. Signed-off-by: Mans Rullgard <mans@mansr.com>
* add ff_ prefix to metadata_conv()Anton Khirnov2010-10-16
| | | | | | patch by Anton Khirnov anton _at_ khirnov _dot_ net Originally committed as revision 25505 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Export metadata in the generic format. Deprecate old conversion API.Anton Khirnov2010-10-15
| | | | | | patch by Anton Khirnov anton _at_ khirnov _dot_ net Originally committed as revision 25493 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Replace all occurences of PKT_FLAG_KEY with AV_PKT_FLAG_KEY.Jean-Daniel Dupas2010-03-31
| | | | | | Patch by Jean-Daniel Dupas, devlists shadowlab org Originally committed as revision 22744 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Define AVMediaType enum, and use it instead of enum CodecType, whichStefano Sabatini2010-03-30
| | | | | | is deprecated and will be dropped at the next major bump. Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move put_le16_nolen() to asf.c and give it a ff_ prefix. This way, it is easierZhentan Feng2010-03-24
| | | | | | | | to share it with e.g. MMS. Patch by Zhentan Feng <spyfeng gmail com>. Originally committed as revision 22656 to svn://svn.ffmpeg.org/ffmpeg/trunk
* asfenc: write tags in proper UTF-16.Anton Khirnov2010-02-25
| | | | | | Patch by Anton Khirnov wyskas gmail com Originally committed as revision 22059 to svn://svn.ffmpeg.org/ffmpeg/trunk
* asfenc: simplify writing of comment header.Anton Khirnov2010-02-25
| | | | | | Patch by Anton Khirnov wyskas gmail com Originally committed as revision 22058 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Don't add WM prefixes to all written ASF tags.Anton Khirnov2010-02-24
| | | | | | Patch by Anton Khirnov <wyskas gmail com>. Originally committed as revision 22033 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Eliminate put_str16().Anton Khirnov2010-02-24
| | | | | | Patch by Anton Khirnov <wyskas gmail com>. Originally committed as revision 22031 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Strings in extended content header are UTF16,Anton Khirnov2010-02-15
| | | | | | | | so terminating NULLs are 2 bytes long, not 1. Patch by Anton Khirnov, wyskas gmail Originally committed as revision 21841 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove any reference to ASFContext.packet_size and replace it withRonald S. Bultje2009-06-24
| | | | | | | AVFormatContext.packet_size. See "[PATCH] asf*.c/h: use AVFormatContext->packet_size instead of own copy" thread on ML. Originally committed as revision 19270 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add ff_ prefixes to exported symbols in libavformat/riff.h.Daniel Verkamp2009-06-22
| | | | | | patch by Daniel Verkamp, aniel drv nu Originally committed as revision 19254 to svn://svn.ffmpeg.org/ffmpeg/trunk