summaryrefslogtreecommitdiff
path: root/libavformat/mxfdec.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.
* lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-27
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* Replace av_dlog with normal av_log at trace levelVittorio Giovara2015-04-19
| | | | This applies to every library where performance is not critical.
* mxfdec: Fix the error handling for when strftime failsMartin Storsjö2015-03-08
| | | | | | The str variable is a char ** here. Signed-off-by: Martin Storsjö <martin@martin.st>
* avformat: Don't anonymously typedef structsDiego Biurrun2015-02-14
|
* mxfdec: reduce loop bound in mxf_read_pixel_layout()Tomas Härdin2014-10-27
| | | | | | Makes coverity less confused and code more readable. Bug-Id: CID 732262
* lavf: Check the return value of strftimeMartin Storsjö2014-10-26
| | | | | | | | If the buffer provided to strftime is too small, the buffer contents are indeterminate - it does not guarantee actually null terminating the buffer. Signed-off-by: Martin Storsjö <martin@martin.st>
* mxfdec: add missing breakVittorio Giovara2014-10-24
| | | | | CC: libav-stable@libav.org Bug-Id: CID 732232
* mxf: Support AACLuca Barbato2014-08-17
| | | | | | | Update mxf_set_audio_pts to use the container-provided information. The UL is marked as "to be changed in the future", but the current samples in the wild do use it.
* mxf: Add the UL for the MPEG2VideoDescriptorLuca Barbato2014-08-17
|
* mxf: Add UID print helpersLuca Barbato2014-08-17
| | | | And use it to print non-parsed ULs.
* mxf: Extract origin information from material and source trackMarc-Antoine Arnaud2014-07-28
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mxf: Detect Vanc/Vbi SMPTE-436M mxf trackMarc-Antoine Arnaud2014-07-28
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mxf: Remove typoLuca Barbato2014-04-03
| | | | Reported-By: Vittorio Giovara <vittorio.giovara@gmail.com>
* mxf: Lowercase UL stringsLuca Barbato2014-03-19
| | | | The specification uses lower case most of the time.
* mxf: Override faulty PreviousPartition entriesLuca Barbato2014-03-19
| | | | | | | | | | Some files set the PreviousPartition field to point to its own offset. If we are parsing forward the Previous partition is immediately known and its value could be used, otherwise we can safely point to the header. Reported-By: Jean Baptiste Kempf <jb@videolan.org>
* lavf: more correct printf format specifiersDiego Biurrun2014-03-11
|
* mxfdec: Validate parameters to strftimeMartin Storsjö2014-03-10
| | | | | | | | | | | | The MSVCRT version of strftime calls the invalid parameter handler if the struct values in struct tm are invalid. In case no invalid parameter handler is set for the process, the process is aborted. This fixes fate failures on MSVC builds since 570af382. Based on a patch by Hendrik Leppkes. Signed-off-by: Martin Storsjö <martin@martin.st>
* mxf: Return meaningful errorsLuca Barbato2014-03-06
|
* mxf: Parse random index packPaul B Mahol2014-03-06
| | | | | | | | | | Get the last partition offset and use it when footer partition offset is missing. Footer partition may not be present and even if present footer partition offset may not be set in any partition except last one. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mxf: Handle identification metadataMatthieu Bouron2014-03-06
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mxf: Set audio packets ptsMatthieu Bouron2014-03-06
| | | | | | | | | | | Extrapolate audio timestamps based on the number of samples demuxed. Deal with some MXF nastiness involving fractional number of samples per EditUnit when seeking (the specs handwave this away). Further fixes from Tomas Härdin. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mxfdec: free descriptor extradata in .read_close()Janne Grunau2014-02-09
| | | | Fixes memleak in fate-mxf-demux.
* mxf: Read field dominance flagMatthieu Bouron2014-02-01
| | | | | | And export the information in field_order. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mxf: Handle negative edit_rateLuca Barbato2014-02-01
| | | | Default to 1/25.
* mxf: Fix potential leak in mxf_read_local_tags()Tomas Härdin2014-01-14
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mxf: Correctly support files from Pinnacle ThunderTomas Härdin2014-01-14
| | | | | | | | | | | | | | | | | | | | | | | | Such files have IndexTableSegments which when parsed cover EditUnit ranges like this: [0,1) [249,250) [249,377) [0,249) where each interval is [IndexStartPosition, IndexStartPosition + IndexDuration) This would be reduced to a sparse index like: [0,1), [249,250) instead of the full range: [0,249), [249,377) Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mxf: Fix a possible leak of extradataMichael Niedermayer2014-01-14
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mxf: Use av_malloc_arrayLuca Barbato2014-01-14
|
* mxf: Drop unnecessary checksLuca Barbato2014-01-14
| | | | av_reallocp_array does the check already.
* mxf: Fix off by one error in d10 aes3 decodingMarton Balint2014-01-14
| | | | Without this fix the last sample was missing from the packet.
* mxf: Do not use int to check the seek positionLuca Barbato2014-01-14
| | | | | | Overly large files are to be expected. Reported-by: Jean-Baptiste Kempf <jb@videolan.org>
* mxf: Set AV_FIELD_PROGRESSIVEReimar Döffinger2014-01-14
| | | | | | Needed for AVC-intra Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mxfdec: set extradata sizeAnton Khirnov2013-11-29
| | | | | The line setting it was mistakenly removed in ecf442a58b09bdb1dc1d2c3904b82ac5f79b2878
* Add missing #includes for *INT64_MAX and *INT64_CDiego Biurrun2013-11-23
|
* lavf: improve support for AVC-Intra files.Reimar Döffinger2013-11-14
| | | | | | | | Generate extradata with SPS/PPS based on container dimensions. Authors of this commit are: Reimar and Thomas Mundt Signed-off-by: Anton Khirnov <anton@khirnov.net>
* mxfdec: update current edit unit when seeking in mxf files without index tablesMarton Balint2013-11-14
| | | | | | | | Fixes audio packet pts values in some files generated by AVID TRMG 3.01. Signed-off-by: Marton Balint <cus@passwd.hu> Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* mxf: Add jpeg2000 codec to intra only codecsMatthieu Bouron2013-10-10
| | | | | | Conform with SMPTE RP 224 and SMPTE s422. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mxf: Remove a typoLuca Barbato2013-10-01
| | | | Introduced in 93370d1216
* mxfdec: set audio timebase to 1/samplerateAnton Khirnov2013-09-29
| | | | | | | | Fixes sync in some samples (e.g. bugs 7581 and 8374 in VLC). Based on a commit by Matthieu Bouron <matthieu.bouron@gmail.com> Reported-by: Jean-Baptiste Kempf <jb@videolan.org> CC: libav-stable@libav.org
* avformat: Use av_reallocp_array() where suitableAlexandra Khirnova2013-09-10
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* Remove commented-out debug #define cruftDiego Biurrun2013-05-16
|
* avformat: av_log_ask_for_sample() ---> avpriv_request_sample()Diego Biurrun2013-03-13
|
* mxfdec: fix NULL checking in mxf_get_sorted_table_segments()Xi Wang2013-01-04
| | | | | | | | | | | | The following out-of-memory check is broken. *sorted_segments = av_mallocz(...); if (!sorted_segments) { ... } The correct NULL check should use *sorted_segments. Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* mxfdec: fix typo in mxf_read_seek()Janne Grunau2012-11-15
| | | | | | | Check the number of index tables before using byte offset based seeking instead of the index_tables pointer. Found by Måns Rullgård <mans@mansr.com>.
* Use the new aes/md5/sha/tree allocation functionsMartin Storsjö2012-10-11
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* mxfdec: return error if no segments are available in ↵Janne Grunau2012-10-10
| | | | | | mxf_get_sorted_table_segments Fixes CID732275.
* Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormatAnton Khirnov2012-10-08
|
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-07
|