summaryrefslogtreecommitdiffstats
path: root/libavformat/mov.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge commit 'be089af38f65dc8b1fe3564f98020fc815577edb'Michael Niedermayer2015-04-091-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit 'be089af38f65dc8b1fe3564f98020fc815577edb': mov: Rely on box type rather than file type for colr atom Conflicts: libavformat/mov.c See: 0276b9524294e518cdc7cbfa12b7cb301ed86fb6 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mov: Rely on box type rather than file type for colr atomVittorio Giovara2015-04-091-2/+2
| | | | | | | | | | | | | | | | Although it's not allowed to use only allows 'nclc' in ISOM files, there are samples that do not always respect this rule. This change prevents atom overread and a spurious color range initialization. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | lavf/mov: Do not overread iTunes metadata.Carl Eugen Hoyos2015-04-041-1/+1
| | | | | | | | Fixes ticket #4425.
* | avformat/mov: check color parameter type explicitly.Jochen Strunk2015-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | Fixes ticket #4387. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Note, Vittorio Giovara had submitted a very similar fix to me privately a few hours before this, iam applying Jochens because it comes with a commit message too and i had not yet applied Vittorios, but For sake of credit, Vittorio independently solved this first
* | Merge commit 'e4fe535d12f4f30df2dd672e30304af112a5a827'Michael Niedermayer2015-03-241-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit 'e4fe535d12f4f30df2dd672e30304af112a5a827': mov: Write the display matrix in order Conflicts: libavformat/mov.c libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mov: Write the display matrix in orderVittorio Giovara2015-03-231-1/+1
| | | | | | | | | | | | | | | | | | | | This will allow to copy the matrix as is and it is just cleaner to keep the matrix in the same order specified by the mov standard (which is also explicitly described in the documentation). In order to preserve compatibility, flip the angle sign in the display API av_display_rotation_set() and av_display_rotation_get(), and improve the documentation mentioning the rotation direction.
| * mov: Add option to keep exact packet sequence after seekingDerek Buitenhuis2015-03-181-9/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The current behavior may produce a different sequence of packets after seeking, compared to demuxing linearly from the beginning. This is because the MOV demuxer seeks in each stream individually, based on timestamp, which may set each stream at a slightly different position than if the file would have been read sequentially. This makes implementing certain operations, such as segmenting, quite hard, and slower than need be. Therefore, add an option which retains the same packet sequence after seeking, as when a file is demuxed linearly.
| * mov: Fix little endian audio detectionVittorio Giovara2015-03-171-1/+1
| | | | | | | | | | | | | | | | | | | | Set this field to TRUE if the audio component is to operate on little-endian data, and FALSE otherwise. However TRUE and FALSE are not defined. Since this flag is just a boolean, interpret all values except for 0 as little endian. Sample-Id: 64bit_FLOAT_Little_Endian.mov
* | mov: Add option to keep exact packet sequence after seekingDerek Buitenhuis2015-03-181-11/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The current behavior may produce a different sequence of packets after seeking, compared to demuxing linearly from the beginning. This is because the MOV demuxer seeks in each stream individually, based on timestamp, which may set each stream at a slightly different position than if the file would have been read sequentially. This makes implementing certain operations, such as segmenting, quite hard, and slower than need be. Therefore, add an option which retains the same packet sequence after seeking, as when a file is demuxed linearly.
* | avformat/mov: fix mis-detection of jpeg2000Michael Niedermayer2015-03-171-1/+3
| | | | | | | | | | | | Fixes demuxer choice for Ticket 2792 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mov: Disallow ".." in dref unless use_absolute_path is setMichael Niedermayer2015-03-161-0/+3
| | | | | | | | | | | | | | | | as this kind of allows to circumvent it to some extend. We also could add a separate parameter or value to choose this Found-by: ramiro Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mov: Check for string truncation in mov_open_dref()Michael Niedermayer2015-03-141-1/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mov: Use sizeof(filename) instead of a literal numberMichael Niedermayer2015-03-141-2/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '91eee2af87278b3c2008f7a86d2cdfe6934e9f42'Michael Niedermayer2015-03-021-34/+15
|\ \ | |/ | | | | | | | | | | | | | | | | * commit '91eee2af87278b3c2008f7a86d2cdfe6934e9f42': Revert "mov: Change DTS-based seek into CTS-based seek." Conflicts: libavformat/mov.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Revert "mov: Change DTS-based seek into CTS-based seek."Martin Storsjö2015-03-021-29/+15
| | | | | | | | | | | | | | | | | | | | | | This reverts commit 4abfa387b8234736f6e0e541951e3d5eb60eb843. This commit broke playback of fragmented mp4 files with b-frames. While investigating this, it turned out that the general framework isn't ready for a PTS-based index yet. Revert this change until a better thought out solution is in place. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Revert "avformat/mov: Bypass av_add_index_entry()"Michael Niedermayer2015-03-021-3/+2
| | | | | | | | | | | | | | | | Next commit will revert the PTS seeking so this is not needed anymore This reverts commit 38e641a060e0c00930851a8053ca96250b3ecccc. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/mov: correct printf specifierChristophe Gisquet2015-02-271-1/+1
| | | | | | | | | | | | The type is int64_t. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mov: Check ctts_count before useMichael Niedermayer2015-02-251-1/+5
| | | | | | | | | | | | | | | | Fixes out of array read Fixes: asan_heap-oob_ae74b5_3610_cov_1739568095_test.3g2 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mov: Check av_add_index_entry() return valueMichael Niedermayer2015-02-231-3/+6
| | | | | | | | | | | | | | | | Fixes NULL pointer dereference Fixes: signal_sigsegv_b060e0_3794_cov_1293954059_vc1-wmapro.ism Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mov: Add simple ACLR atom reading to set the color range of the ↵Kevin Wheatley2015-02-191-22/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | incomming track for codec's like DNxHD that utilise AVID's proprietary atom. On input ACLR will be used to set colour range no matter which codec it is associated with. No change for when it will be output. Rework mov_read_extradata function to allow detection of truncated atom reads by callers. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mov: Bypass av_add_index_entry()Michael Niedermayer2015-02-161-1/+2
| | | | | | | | | | | | | | | | | | The new mov code uses a temporally non sorted index since 4abfa387b8234736f6e0e541951e3d5eb60eb843 and can thus no longer be filled with av_add_index_entry() which expects the index to be sorted. Reverting 4abfa387b8234736f6e0e541951e3d5eb60eb843 and this commit would be a alternative fix as would be various other options. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '4abfa387b8234736f6e0e541951e3d5eb60eb843'Michael Niedermayer2015-02-161-15/+30
|\ \ | |/ | | | | | | | | | | | | | | | | * commit '4abfa387b8234736f6e0e541951e3d5eb60eb843': mov: Change DTS-based seek into CTS-based seek. Conflicts: libavformat/mov.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mov: Change DTS-based seek into CTS-based seek.Yusuke Nakamura2015-02-151-15/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | CTS-based seek is reasonable since player requests frames in output order not coded order. This change fixes seek to a keyframe within consecutive keyframes. Let's say P[0|-1] and P[1|0], here x and y inside [x|y] are PTS and DTS respectively, and both two frames are a keyframe. If you try to seek on PTS=0, i.e. P[0|-1], you'll get P[1|0] if the demuxer is DTS based. This is obviously undesirable. Signed-off-by: Martin Storsjö <martin@martin.st>
| * mov: Fix compilation with DEBUG enabledDiego Biurrun2015-02-141-2/+2
| |
* | avformat/mov: print a warning if parsing udta failedMichael Niedermayer2015-02-141-0/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mov: Heuristically detect raw udtaMichael Niedermayer2015-02-131-1/+6
| | | | | | | | | | | | Fixes tkhd+moov fragment provided by koda Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mov: Check dimensions before setting aspectMichael Niedermayer2015-02-091-1/+2
| | | | | | | | | | | | | | | | Fixes division by 0 Fixes: asan_heap-uaf_143f420_728_cov_1441472032_HDV_0113.MP4 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'e3528d2a7bf29ba148d7ac1678552ce0089cd14f'Michael Niedermayer2015-02-031-4/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit 'e3528d2a7bf29ba148d7ac1678552ce0089cd14f': mov: Implement parsing of the "HandlerName" from the MP4 HDLR atom Conflicts: libavformat/mov.c See: b76bc010343b0cff8717cc7ee81e47273272336c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mov: Implement parsing of the "HandlerName" from the MP4 HDLR atomHendrik Leppkes2015-02-031-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This atom typically is used for a track title. The handler name is stored as a Pascal string in the QT specs (first byte is the length of the string), so do not export it. A second length check based on the first character is added to avoid overwriting an already specified handler_name (it happens with YouTube videos for instance, the handler_name get masked), or specifying an empty string metadata. The Pascal string fix and the second length check are written by Clément Bœsch <clement.boesch@smartjog.com>. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | avformat/mov: simplify pasp value before setting SARMichael Niedermayer2015-02-031-2/+2
| | | | | | | | | | | | This avoids a 65536:65536 SAR Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mov: remove unneeded #include, there are no assert()Paul B Mahol2015-01-311-4/+0
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge commit '32125781487411ed3b1b28b32063d6cd4024d4fc'Michael Niedermayer2015-01-271-4/+20
|\ \ | |/ | | | | | | | | | | * commit '32125781487411ed3b1b28b32063d6cd4024d4fc': mov: export audio service type as side data Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mov: export audio service type as side dataAnton Khirnov2015-01-271-4/+20
| |
| * mov: Do not compute negative SAR valuesVittorio Giovara2015-01-231-7/+6
| | | | | | | | | | | | | | | | This partially reverts cf70ba37ba74089a18295b29e77dead0a3222c9e, since it didn't take into account when rotation is 0, but there is another valid operation (eg. translation) in the matrix. Found-by: Michael Niedermayer <michaelni@gmx.at>
* | libavformat/mov.c: Handle timecode from tmcd atom in counter modeJon Morley2015-01-231-0/+7
| | | | | | | | | | | | | | When the timecode value is in counter mode then it is important to use the timescale and frameduration to calculate the timecode fps. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mov: Stricter sanity checks on the display_matrixMichael Niedermayer2015-01-221-1/+2
| | | | | | | | | | | | | | Fixes "broken" tkhd Found-by: koda Tested-by: koda Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mov: Do not set aspect ratios that would contain zerosMichael Niedermayer2015-01-151-1/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mov: rewrite aspect from matrix codeMichael Niedermayer2015-01-151-13/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original code was intended purely for rotation == 0 In cf70ba37ba74089a18295b29e77dead0a3222c9e the condition was changed to use it only for rotation != 0 which broke the cases for which it was intended to be used as well as breaking cases for which it was not intended to be used. This changes the code so it could work for the more general case and fixes the regressions If you have sample files that are not handled correctly please open tickets or mail me! Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'cf70ba37ba74089a18295b29e77dead0a3222c9e'Michael Niedermayer2015-01-151-9/+4
|\ \ | |/ | | | | | | | | | | * commit 'cf70ba37ba74089a18295b29e77dead0a3222c9e': mov: Check angle rather than full matrix when updating SAR Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mov: Check angle rather than full matrix when updating SARVittorio Giovara2015-01-141-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | When the display matrix is not the identity one, but the rotation angle is zero, there is no need to update the sample aspect ratio. Otherwise, it is possible to obtain negative values which interferes with transcoding in later stages. This kind of behaviour is reproducible on mov files with "major_brand: MSNV". CC: libav-stable@libav.org Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Handle r10k endianess atom DpxE.Carl Eugen Hoyos2015-01-111-0/+6
| | | | | | | | | | | | Fixes playback and remuxing of r10k_full-range_big-endian.mov. Reported, analyzed and tested by Olaf Matthes, olaf matthes gmx de
* | avformat/mov: Use avio_closep() to avoid leaving stale pointers in memoryMichael Niedermayer2015-01-081-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mov: use av_freep() to avoid leaving stale pointers in memoryMichael Niedermayer2015-01-061-5/+5
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mov: Clear array to prevent potential out of array read from av_dlog()Michael Niedermayer2015-01-061-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mov: Fix negative size calculation in mov_read_default().Dale Curtis2015-01-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous code assumed if an atom was marked with a 64-bit size extension, it actually had that data available. The new code verfies there's enough data in the atom for this to be done. Failure to verify causes total_size > atom.size which will result in negative size calculations later on. Found-by: Paul Mehta <paul@paulmehta.com> Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mov: fix integer overflow in mov_read_udta_string()Michael Niedermayer2015-01-061-1/+1
| | | | | | | | | | Found-by: Paul Mehta <paul@paulmehta.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mov: Fix overflow and error handling in read_tfra().Dale Curtis2015-01-061-15/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under abnormal conditions the item_count may exceed the max allocation size on 32-bit systems, this causes the allocated size to overflow and become too small for the given count. Additionally, if av_reallocp() fails its allocation, the fragment_index_count is not correctly decremented. Ensuring further havoc may be wrought, the error code for read_tfra() is not checked upon return. Found-by: Paul Mehta <paul@paulmehta.com> positive return code and use of _array functions by commiter Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mov: reindent after previous commitClément Bœsch2015-01-021-13/+13
| |
* | avformat/mov: move edit list heuristics into mov_build_index()Clément Bœsch2015-01-021-30/+48
| | | | | | | | | | mov_read_elst() is now only responsible from storing the table in a data structure; this is consistent with other table readers functions.
* | Merge commit '64f7575fbd64e5b65d5c644347408588c776f1fe'Michael Niedermayer2014-12-191-1/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit '64f7575fbd64e5b65d5c644347408588c776f1fe': mov: avoid a memleak when multiple stss boxes are present Conflicts: libavformat/mov.c See: 5ab882d7283f57560c889919c35f2688253b1d9c Merged-by: Michael Niedermayer <michaelni@gmx.at>
OpenPOWER on IntegriCloud