summaryrefslogtreecommitdiff
path: root/libavformat/mxfdec.c
Commit message (Collapse)AuthorAge
* 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
|
* Improve descriptiveness of a number of codec and container long namesDiego Biurrun2012-07-30
|
* mxfdec: fix off by one error.Michael Niedermayer2012-07-10
| | | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mxfdec: only parse next partition pack if parsing forwardTomas Härdin2012-07-10
| | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mxfdec: let pkt->pts = mxf->current_edit_unit if intra-onlyTomas Härdin2012-07-10
| | | | | | | | We cannot do this in general since we could be reading a file with B-frames while lacking an index. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mxfdec: fix frame height vs field height confusionJoseph Artsimovich2012-07-10
| | | | | | | Reviewed-by: Tomas Härdin <tomas.hardin@codemill.se> Reveiwed-by: Baptiste Coudurier <baptiste.coudurier@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mxfdec: Add intra_only flag to MXFTrackTomas Härdin2012-07-10
| | | | | | | This allows future assumptions to be made without affecting non-intra files. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mxfdec: fix Avid AirSpeed files being misinterpreted as OP1aTomas Härdin2012-07-10
| | | | | | | | | The "ECs != 1 -> OP1a" assumption was wrong. Luckily, the file that triggered that behavior had two ECs, not zero. Hence distinguishing between them is simple in this case. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mxfdec: truncate packets that extend past the next edit unitTomas Härdin2012-07-10
| | | | | | | | This fixes rare cases where OPAtom may be treated as OP1a, causing all essence to be read into RAM. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mxfdec: set pixel format for cdci picture formatsPhilip de Nier2012-07-10
| | | | | | | | | | | | | | | | | | The properties of the CDCI Descriptor are insufficient to specify the pixel format for uncompressed picture data. SMPTE 377-1 and RP224v10 have defined a set of picture coding labels to indicate what formatting was used. This patch uses 2 labels to detect UYVY422 or YUYV422 pixel formats. It defaults to UYVY422 for 8-bit 4:2:2 pictures to support files that were created before the coding labels were introduced ~2008 The codec pix_fmt default was changed from 0 (PIX_FMT_YUV420P) to -1 (PIX_FMT_NONE) Reviewed-by: Baptiste Coudurier <baptiste.coudurier@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* mxfdec: detect uncomp pictures using essence container ulPhilip de Nier2012-07-10
| | | | | | | | | | This supports detection of uncompressed picture in files that didn't include a Picture Coding Label. The lables weren't available until SMPTE 377-1 and RP224v10 Reviewed-by: Baptiste Coudurier <baptiste.coudurier@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mxfdec: set track edit rate num/den in expected orderPhilip de Nier2012-07-10
| | | | | | | | This matches the order used for the index table edit rate. Reviewed-by: Baptiste Coudurier <baptiste.coudurier@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mxfdec: replace x>>av_log2(sizeof(..)) by x/sizeof(..).Ronald S. Bultje2012-07-07
| | | | | | Also replace x>>av_log2(sizeof(..)) + 1 by x/sizeof(..). The +1 is probably meant to emulate av_log2_ceil(sizeof(..)) in cases where ".." is not a power of two.
* mxfdec: Ignore the last entry in Avid's index table segmentsTomas Härdin2012-02-09
| | | | | | | | The last entry is the total size of the essence container. Previously a TemporalOffset error would be logged, even though segments like these are expected. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* mxfdec: Sanity-check SampleRateTomas Härdin2012-02-09
| | | | | | This avoids a SIGFPE if SampleRate is missing or set to naughty values. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* mxfdec: Handle small EditUnitByteCountTomas Härdin2012-02-09
| | | | | | | These are common with audio atoms. Without this the demuxer would read two bytes at a time for a mono 16-bit file. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* mxfdec: Consider OPAtom files that do not have exactly one EC to be OP1aTomas Härdin2012-02-09
| | | | | | This fixes demuxing of 2011_DCPTEST_24FPS.V.mxf. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* mxfdec: Don't crash in mxf_packet_timestamps() if current_edit_unit overflowsTomas Härdin2012-02-09
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* mxfdec: Zero nb_ptses in mxf_compute_ptses_fake_index()Tomas Härdin2012-02-09
| | | | | | This fixes SIGSEGV on files with both CBR and VBR index segments (zzuf6.mxf). Signed-off-by: Diego Biurrun <diego@biurrun.de>
* mxfdec: Sanity check PreviousPartitionTomas Härdin2012-02-09
| | | | | | Without this certain files could get the demuxer stuck in a loop. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* mxfdec: Never seek back in local sets and KLVsTomas Härdin2012-02-09
| | | | | | | | | Specially crafted files can lead the parsing code to take too long. We fix a lot of these problems by not allowing local tags to extend past the end of the set and not allowing other KLVs to be read past the end of themselves. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* mxfdec: Move the current_partition check inside mxf_read_header()Tomas Härdin2012-02-09
| | | | | | This fixes SIGSEGV on files where this is the case, such as zzuf4.mxf. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* mxfdec: Fix infinite loop in mxf_packet_timestamps()Tomas Härdin2012-02-09
| | | | | | | This can happen if an index table segment has a very large IndexStartPosition. zzuf3.mxf is an example of such a file. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* mxfdec: Check eof_reached in mxf_read_local_tags()Tomas Härdin2012-02-09
| | | | | | This fixes an infinite loop with zzuf2.mxf. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* mxfdec: Check for NULL componentTomas Härdin2012-02-09
| | | | | | This fixes a SIGSEGV with zzuf1.mxf. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* mxfdec: Make sure mxf->nb_index_tables > 0 in mxf_packet_timestamps()Tomas Härdin2012-02-09
| | | | | | | Only the OPAtom demuxing logic is guaranteed to have index tables, meaning OP1a files that lack an index would cause SIGSEGV. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* mxfdec: Make sure x < index_table->nb_ptsesTomas Härdin2012-02-09
| | | | | | Avoids a SIGSEGV on files with IndexEntryCount < IndexDuration. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* lavf: remove AVFormatParameters from AVFormatContext.read_header signatureAnton Khirnov2012-01-27
|
* mxfdec: Fix files with essence containers larger than 2 GiB.Tomas Härdin2012-01-26
| | | | | | For such files, accumulating into an int would cause an overflow. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* mxfdec: Employ correct printf conversion specifiers for POSIX int types.Jean First2012-01-26
| | | | | Signed-off-by: Jean First <jeanfirst@gmail.com> Signed-off-by: Diego Biurrun <diego@biurrun.de>
* mxfdec: fix memleak on mxf_read_close()Janne Grunau2012-01-23
|
* mxfdec: fix memleak on av_realloc failuresJanne Grunau2012-01-22
|
* mxfdec: Do not parse slices or DeltaEntryArrays.Tomas Härdin2012-01-22
| | | | The most recent demuxing/seeking code does not need them.
* mxfdec: hybrid demuxing/seeking solutionJanne Grunau2012-01-22
| | | | | | | | | | | | | | | | | | This uses the old demuxing code for OP1a and separate demuxing code for OPAtom. Timestamp output is added to the old demuxing code. The seeking code is made to seek to the start of the desired EditUnit only, from which the normal demuxing code takes over (if OP1a). This means we do not use delta entries or slices, only StreamOffsets. OPAtom seeking basically works like before. This also makes D-10 seeking behave the same way as OP1a and OPAtom. In other words, we allow seeking before the start or past the end for D-10 too. Based on several patches by Tomas Härdin <tomas.hardin@codemill.se> and Reimar Döffinger <Reimar.Doeffinger@gmx.de>. Changed av_calloc to av_mallocz, added overflow checks.
* mxfdec: Add Avid's essence element key.Tomas Härdin2012-01-22
| | | | Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* mfxdec: Separate mxf_essence_container_uls for audio and video.Carl Eugen Hoyos2012-01-22
| | | | | | | | | It is a really bad idea to assign a video codec id when we have set codec_type to audio and vice versa. Prevents detection of mp2 in mxf as mpeg2video. Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* mxfdec: Compute packet offsets properly.Tomas Härdin2012-01-22
| | | | | | This replaces the old essence_offset code. Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* mxfdec: Use MaterialPackage - Track - TrackID instead of the system_item hack.Tomas Härdin2012-01-22
| | | | Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* mxfdec: use av_dlog() for 'no corresponding source package found'Tomas Härdin2012-01-22
| | | | | | This is not an error and expected behavior for OPAtom files. Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* mxfdec: Make mxf->partitions sorted by offset.Tomas Härdin2012-01-22
| | | | | | This also zeroes new entries for good measure (used by future patches). Signed-off-by: Janne Grunau <janne-libav@jannau.net>