summaryrefslogtreecommitdiff
path: root/libavformat/avidec.c
Commit message (Collapse)AuthorAge
* cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* 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.
* avi: Spin out the logic to position to the next non-interleaved streamLuca Barbato2015-12-02
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* avi: Validate the stream-id for DV as wellMichael Niedermayer2015-12-02
| | | | | | | | | | Avoid false positives while syncing. Bug-Id: ffmpeg/4086 Bug-Id: 879 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* avi: Use the correct data typeLuca Barbato2015-12-02
| | | | avio_tell returns an int64_t.
* 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`.
* lavc: Drop deprecated destruct_packet related functionsVittorio Giovara2015-08-28
| | | | Deprecated in 10/2012.
* lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-27
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* riff: Use the correct logging contextLuca Barbato2015-07-11
|
* avi: Validate sample_sizeAndreas Cadhalpun2015-05-09
| | | | | | | And either error out or set it to 0 if it is negative. CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* Replace av_dlog with normal av_log at trace levelVittorio Giovara2015-04-19
| | | | This applies to every library where performance is not critical.
* lavf: Do not list mov-only codecs in riff tagsCarl Eugen Hoyos2015-03-17
| | | | | | | Instead check for all mov code-points when demuxing avi and print a warning if a video codec is found like this. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* avformat: Don't anonymously typedef structsDiego Biurrun2015-02-14
|
* avidec: do not export stream_codec_tagAnton Khirnov2015-01-27
| | | | Handle its only existing use case internally.
* Allow reading of growing avi files (currently being written)Joakim Plate2014-12-08
| | | | | | | | | | | | | This uses the RIFF header stored size to figure out the expected AVI file size, instead of the actual file. To work fully it requires handling failed avio_seek() instead of assuming they always succeed. Some fate file has been cut off and contains half a frame at the end which previously was not output during demuxing. This frame is now output to encoder, thus the fate diff update. Bug-Id: 261 Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* avi: Improve non-interleaved detectionMichael Niedermayer2014-04-02
| | | | | | | | | | | | | | | Additional fixes by Nigel Touati-Evans <nigel.touatievans@gmail.com>. Check the index for streams with a time drift of 2s or a buffer drift of 64MB. Bug-Id: 666 CC: libav-stable@libav.org Sample-Id: yet-another-broken-interleaved-avi.avi Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org> Signed-off-by: Diego Biurrun <diego@biurrun.de>
* lavf: add supported extension to avi and mov demuxersMarc-Antoine Arnaud2014-04-02
|
* lavf: more correct printf format specifiersDiego Biurrun2014-03-11
|
* Add missing #includes for *INT64_MAX and *INT64_CDiego Biurrun2013-11-23
|
* avidec: fix a memleak in the dv init code.Anton Khirnov2013-11-21
| | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC:libav-stable@libav.org
* avi: directly resync on DV in AVI read failureLuca Barbato2013-10-10
| | | | | Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* avi: DV in AVI must be considered single streamLuca Barbato2013-10-10
| | | | | Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* avi: properly fail if the dv demuxer is missingLuca Barbato2013-10-10
| | | | CC: libav-stable@libav.org
* avidec: Make sure a packet is large enough before reading its dataMartin Storsjö2013-09-29
| | | | | | Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: Reset the entry count and allocation size variables on av_reallocp ↵Martin Storsjö2013-09-26
| | | | | | | | | | | | | | failures When av_reallocp fails, the associated variables that keep track of the number of elements in the array (and in some cases, the separate number of allocated elements) need to be reset. Not all of these might technically be needed, but it's better to reset them if in doubt, to make sure variables don't end up conflicting. Signed-off-by: Martin Storsjö <martin@martin.st>
* avformat: Use av_reallocp() where suitableAlexandra Khirnova2013-09-18
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* Disable deprecation warnings for cases where a replacement is availableDiego Biurrun2013-08-02
|
* avidec: Let the inner dv demuxer take care of discardingLuca Barbato2013-07-27
| | | | CC: libav-stable@libav.org
* avidec: K&R formatting cosmeticsLuca Barbato2013-07-27
| | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* avformat: Add AVPROBE_SCORE_EXTENSION define and use where appropriateDiego Biurrun2013-05-04
|
* 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.
* avidec: use sensible error codes instead of -1Jindrich Makovicka2013-01-21
| | | | | | | | Use AVERROR_INVALIDDATA on invalid inputs, and AVERROR_EOF when no more frames are available in an interleaved AVI. Signed-off-by: Jindrich Makovicka <makovick@gmail.com> Signed-off-by: Diego Biurrun <diego@biurrun.de>
* avformat: Convert some commented-out printf/av_log instances to av_dlogDiego Biurrun2012-10-01
|
* avformat: Remove non-compiling and/or silly commented-out printf/av_log ↵Diego Biurrun2012-10-01
| | | | statements
* avidec: use actually read size instead of requested sizeAnton Khirnov2012-09-29
| | | | Fixes CVE-2012-2788
* avidec: return 0, not packet size from read_packet().Anton Khirnov2012-09-29
|
* 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
|
* avidec: make scale and rate unsigned.Anton Khirnov2012-06-04
| | | | The specs say they are unsigned 32bit integers.
* lavf: deprecate av_read_packet().Anton Khirnov2012-03-20
| | | | | | The caller can achieve the same effect (i.e. getting raw unparsed/mangled packets) with av_read_frame() and AVFMT_FLAG_NOPARSE | AVFMT_FLAG_NOFILLIN
* libavformat: Add an ff_ prefix to some lavf internal symbolsMartin Storsjö2012-02-15
| | | | | | | | | | Prefix the functions/tables brktimegm, pcm_read_seek, dv_offset_reset, voc_get_packet, codec_movaudio_tags, codec_movvideo_tags. After this, lavf has no global symbols without the proper prefix. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: remove AVFormatParameters from AVFormatContext.read_header signatureAnton Khirnov2012-01-27
|
* avidec: migrate last of lavf from FF_ER_* to AV_EF_*Dustin Brody2012-01-20
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* Replace all uses of av_close_input_file() with avformat_close_input().Anton Khirnov2011-12-12
|
* lavf: make av_set_pts_info private.Anton Khirnov2011-11-30
| | | | It's supposed to be called only from (de)muxers.
* Generalize RIFF INFO tag support; support reading INFO tag in wavVictor Vasiliev2011-11-26
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* Replace all usage of strcasecmp/strncasecmpReimar Döffinger2011-11-06
| | | | | | | | | | | All current usages of it are incompatible with localization. For example strcasecmp("i", "I") != 0 is possible, but would break many of the places where it is used. Instead use our own implementations that always treat the data as ASCII. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: use avpriv_ prefix for some dv functions.Anton Khirnov2011-10-20
| | | | They are used in libavdevice.
* lavf: replace av_new_stream->avformat_new_stream part II.Anton Khirnov2011-10-19
| | | | | | | | Manual replacements are done in this commit. In many cases, the id is some constant made up number (e.g. 0 for video and 1 for audio), which is then not used in the demuxer for anything. Those ids are removed.
* avidec: fix signed overflow in avi_sync()Mans Rullgard2011-10-10
| | | | | | | | Keeping byte values read from the file as unsigned is consistent with how they are subsequently used and avoids an undefined left shift by 24 when bit 7 is set. Signed-off-by: Mans Rullgard <mans@mansr.com>