summaryrefslogtreecommitdiffstats
path: root/libavformat/nutdec.c
Commit message (Collapse)AuthorAgeFilesLines
* lavf: replace AVStream.codec with AVStream.codecparAnton Khirnov2016-02-231-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-131-1/+2
| | | | | | | | 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-251-2/+4
| | | | And make one more informative.
* nut: Provide more information on failureLuca Barbato2015-11-251-5/+10
|
* lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-271-1/+1
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* nut: Make sure to clean up on read_header failureLuca Barbato2015-05-091-17/+22
| | | | | | Based on Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> work. CC: libav-stable@libav.org
* nut: Check chapter creation in decode_info_headerAndreas Cadhalpun2015-05-081-0/+4
| | | | | | | | 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-121-2/+4
| | | | Bug-Id: CID 205122 / CID 205123
* nutdec: Check memory allocationsHugo Beauzée-Luyssen2015-02-171-0/+8
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavf: move internal fields from public to internal contextwm42015-02-101-1/+1
| | | | | | | 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-061-1/+0
| | | | It is not supposed to be set by demuxers.
* nutdec: check av_new_packet return valueVittorio Giovara2014-10-211-2/+4
| | | | | CC: libav-stable@libav.org Bug-Id: CID 733713
* nutdec: Prevent a memory corruptionLuca Barbato2014-10-201-2/+3
| | | | | | Chapters do not have an event_flags field. Bug-Id: CID 1231990
* nutdec: update AVFormatContext.event_flags with STREAM_/METADATA_UPDATED ↵Andrew Stone2014-08-131-2/+11
| | | | | | whenever metadata changes. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* nut: Use nut->version in the version range checkLuca Barbato2014-07-081-3/+4
| | | | | It was wrongly left unchanged when the version field had been introduced. (c94e2e85cb6af8a570d8542a830556243bd32873)
* nut: Support experimental NUT 4 featuresLuca Barbato2014-05-281-5/+24
| | | | | | | 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-221-1/+4
| | | | | CC: libav-stable@libav.org Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* nut: use meaningful error valuesLuca Barbato2013-05-071-11/+17
| | | | Fix the mispresented EINVAL for EOF on partial files, among the other.
* nut: use a define for the nut versionLuca Barbato2013-05-061-1/+1
| | | | Ease switching version in the future and make evident why that value.
* nutdec: Always return a value from nut_read_timestamp()Diego Biurrun2013-01-151-1/+1
| | | | | | | | | 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-281-0/+1
|
* nut: support textual dataLuca Barbato2012-10-291-0/+1
| | | | Plain text (utf8 encoded) data can be muxed and demuxed in nut.
* nut: support pcm codecs not mapped in aviLuca Barbato2012-10-131-1/+6
| | | | The native tags will be used when available.
* nut: prioritize native tagsLuca Barbato2012-10-131-5/+2
| | | | | Use native tags instead of avi ones, simplifies a lot raw video codecs handling.
* nut: add do {} while (0) to GET_VLuca Barbato2012-10-021-20/+22
| | | | Make it consistent with the other function-like macros.
* nutdec: Remove unused and broken debug function stubDiego Biurrun2012-09-271-10/+0
|
* nutdec: const correctness for get_v_trace/get_s_trace function argumentsDiego Biurrun2012-09-261-4/+4
|
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-071-1/+1
|
* avformat: Drop pointless "format" from container long namesDiego Biurrun2012-07-301-1/+1
|
* nutdec: add malloc check and fix const to non-const conversion warningsMans Rullgard2012-04-181-2/+6
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Drop some pointless #ifdefs.Diego Biurrun2012-04-101-2/+0
| | | | The files are only compiled if the #ifdef conditions are met.
* nutdec: K&R formatting cosmeticsAsen Lekov2012-04-101-436/+500
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* cosmetics: Align muxer/demuxer declarationsMartin Storsjö2012-04-061-2/+5
| | | | | | | 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-271-1/+1
|
* lavf: make av_set_pts_info private.Anton Khirnov2011-11-301-1/+1
| | | | It's supposed to be called only from (de)muxers.
* Replace all usage of strcasecmp/strncasecmpReimar Döffinger2011-11-061-3/+2
| | | | | | | | | | | 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-281-4/+4
| | | | | | | 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-201-1/+1
| | | | It's used in libavdevice.
* lavf: replace av_new_stream->avformat_new_stream part II.Anton Khirnov2011-10-191-1/+1
| | | | | | | | 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-171-8/+8
| | | | It's more readable and less prone to breakage.
* Do not include mathematics.h in avutil.hMans Rullgard2011-07-031-0/+1
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Remove all uses of now deprecated metadata functions.Anton Khirnov2011-06-081-2/+3
|
* nutdec: remove unused variableMans Rullgard2011-06-021-3/+1
|
* lavf: remove FF_API_MAX_STREAMS cruftAnton Khirnov2011-04-191-4/+0
|
* avio: introduce an AVIOContext.seekable fieldAnton Khirnov2011-04-031-1/+1
| | | | Use it instead of url_is_streamed and AVIOContext.is_streamed.
* avio: make get_checksum() internal.Anton Khirnov2011-03-301-6/+6
|
* avio: make init_checksum() internal.Anton Khirnov2011-03-301-2/+2
|
* Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-191-4/+4
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* lavf: move ff_get_v from avio.h to avio_internal.hAnton Khirnov2011-03-161-42/+43
| | | | | | 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-161-2/+2
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
OpenPOWER on IntegriCloud