summaryrefslogtreecommitdiff
path: root/libavformat/nutdec.c
Commit message (Collapse)AuthorAge
* 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.
* nutdec: only copy the header if it existsAndreas Cadhalpun2016-01-13
| | | | | | | | Fixes runtime error: null pointer passed as argument 2, which is declared to never be null Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* nut: Mark non-fatal errors as warningsLuca Barbato2015-11-25
| | | | And make one more informative.
* nut: Provide more information on failureLuca Barbato2015-11-25
|
* lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-27
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* nut: Make sure to clean up on read_header failureLuca Barbato2015-05-09
| | | | | | Based on Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> work. CC: libav-stable@libav.org
* nut: Check chapter creation in decode_info_headerAndreas Cadhalpun2015-05-08
| | | | | | | | This fixes a segmentation fault when accessing the metadata. Signed-off-by: Luca Barbato <lu_zero@gentoo.org> CC: libav-stable@libav.org
* nutdec: Prevent leaks on memory errorVittorio Giovara2015-03-12
| | | | Bug-Id: CID 205122 / CID 205123
* nutdec: Check memory allocationsHugo Beauzée-Luyssen2015-02-17
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavf: move internal fields from public to internal contextwm42015-02-10
| | | | | | | This is not an API change; the fields were explicitly declared private before. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* nutdec: do not set has_b_framesAnton Khirnov2014-11-06
| | | | It is not supposed to be set by demuxers.
* nutdec: check av_new_packet return valueVittorio Giovara2014-10-21
| | | | | CC: libav-stable@libav.org Bug-Id: CID 733713
* nutdec: Prevent a memory corruptionLuca Barbato2014-10-20
| | | | | | Chapters do not have an event_flags field. Bug-Id: CID 1231990
* nutdec: update AVFormatContext.event_flags with STREAM_/METADATA_UPDATED ↵Andrew Stone2014-08-13
| | | | | | whenever metadata changes. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* nut: Use nut->version in the version range checkLuca Barbato2014-07-08
| | | | | It was wrongly left unchanged when the version field had been introduced. (c94e2e85cb6af8a570d8542a830556243bd32873)
* nut: Support experimental NUT 4 featuresLuca Barbato2014-05-28
| | | | | | | Add the low overhead pipe mode and the extended broadcast mode. Export the options as 'syncponts' since it impacts only that. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* nut: Fix unchecked allocationsDerek Buitenhuis2013-10-22
| | | | | CC: libav-stable@libav.org Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* nut: use meaningful error valuesLuca Barbato2013-05-07
| | | | Fix the mispresented EINVAL for EOF on partial files, among the other.
* nut: use a define for the nut versionLuca Barbato2013-05-06
| | | | Ease switching version in the future and make evident why that value.
* nutdec: Always return a value from nut_read_timestamp()Diego Biurrun2013-01-15
| | | | | | | | | The function is a callback that is called by ff_gen_search with a constant stream index. Avoid a false positive on older gcc version. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* lavf: move ff_codec_get_tag() and ff_codec_get_id() definitions to internal.hJustin Ruggles2012-11-28
|
* nut: support textual dataLuca Barbato2012-10-29
| | | | Plain text (utf8 encoded) data can be muxed and demuxed in nut.
* nut: support pcm codecs not mapped in aviLuca Barbato2012-10-13
| | | | The native tags will be used when available.
* nut: prioritize native tagsLuca Barbato2012-10-13
| | | | | Use native tags instead of avi ones, simplifies a lot raw video codecs handling.
* nut: add do {} while (0) to GET_VLuca Barbato2012-10-02
| | | | Make it consistent with the other function-like macros.
* nutdec: Remove unused and broken debug function stubDiego Biurrun2012-09-27
|
* nutdec: const correctness for get_v_trace/get_s_trace function argumentsDiego Biurrun2012-09-26
|
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-07
|
* avformat: Drop pointless "format" from container long namesDiego Biurrun2012-07-30
|
* nutdec: add malloc check and fix const to non-const conversion warningsMans Rullgard2012-04-18
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Drop some pointless #ifdefs.Diego Biurrun2012-04-10
| | | | The files are only compiled if the #ifdef conditions are met.
* nutdec: K&R formatting cosmeticsAsen Lekov2012-04-10
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* 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: remove AVFormatParameters from AVFormatContext.read_header signatureAnton Khirnov2012-01-27
|
* lavf: make av_set_pts_info private.Anton Khirnov2011-11-30
| | | | It's supposed to be called only from (de)muxers.
* 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: make some seeking functions privateAnton Khirnov2011-10-28
| | | | | | | Specifically av_update_cur_dts(), av_seek_frame_binary() and av_gen_search(). They are not supposed to be called outside lavf.
* lavf: use avpriv_ prefix for ff_new_chapter().Anton Khirnov2011-10-20
| | | | It's 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.
* lavf: use designated initialisers for all (de)muxers.Anton Khirnov2011-07-17
| | | | It's more readable and less prone to breakage.
* Do not include mathematics.h in avutil.hMans Rullgard2011-07-03
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Remove all uses of now deprecated metadata functions.Anton Khirnov2011-06-08
|
* nutdec: remove unused variableMans Rullgard2011-06-02
|
* lavf: remove FF_API_MAX_STREAMS cruftAnton Khirnov2011-04-19
|
* avio: introduce an AVIOContext.seekable fieldAnton Khirnov2011-04-03
| | | | Use it instead of url_is_streamed and AVIOContext.is_streamed.
* avio: make get_checksum() internal.Anton Khirnov2011-03-30
|
* avio: make init_checksum() internal.Anton Khirnov2011-03-30
|
* Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* lavf: move ff_get_v from avio.h to avio_internal.hAnton Khirnov2011-03-16
| | | | | | And rename it to ffio_read_varlen. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* lavf: replace avio_seek(SEEK_CUR) with avio_skip where it makes senseAnton Khirnov2011-03-16
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>