summaryrefslogtreecommitdiff
path: root/libavformat/mov.c
Commit message (Collapse)AuthorAge
* Merge commit '6308cd4868d2bd5fdf8bfa8dd10856c9a91874f5'Michael Niedermayer2015-06-08
|\ | | | | | | | | | | | | * commit '6308cd4868d2bd5fdf8bfa8dd10856c9a91874f5': mov: Check memory allocation Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mov: Check memory allocationVittorio Giovara2015-06-08
| | | | | | | | | | CC: libav-stable@libav.org Bug-Id: CID 1292518
* | avformat/mov: Retry same packet on IO failure to avoid loosing a packetMichael Niedermayer2015-06-03
| | | | | | | | | | | | Based on patch by: Zhang Rui <bbcallen@gmail.com> Reviewed-by: Zhang Rui <bbcallen@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '5c720657c23afd798ae0db7c7362eb859a89ab3d'Michael Niedermayer2015-06-01
|\| | | | | | | | | | | | | | | | | | | | | * commit '5c720657c23afd798ae0db7c7362eb859a89ab3d': mov: always check avio_read return value Conflicts: libavformat/mov.c See: b71528d8967c1e10f499432fe26ff4713d1fd3b6 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mov: always check avio_read return valueAndreas Cadhalpun2015-05-31
| | | | | | | | | | | | | | | | | | | | | | If avio_read fails, the buffer can contain uninitialized data. This fixes 'Conditional jump or move depends on uninitialised value(s)' valgrind warnings, and addresses a few memleaks. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * mov: reject zero bytes_per_frame with non-zero samples_per_frameAndreas Cadhalpun2015-05-31
| | | | | | | | | | | | | | In this case the mov demuxer can return a large number of empty packets. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | Merge commit 'a8a90906fb0ad0f8d3c68a97f182528ee3b5198c'Michael Niedermayer2015-06-01
|\| | | | | | | | | | | | | | | | | | | * commit 'a8a90906fb0ad0f8d3c68a97f182528ee3b5198c': mov: Correctly allocate ctts_data Conflicts: libavformat/mov.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mov: Correctly allocate ctts_dataLuca Barbato2015-05-31
| | | | | | | | | | | | It can be reallocated. CC: libav-stable@libav.org
| * mov: Fix two memleaksAndreas Cadhalpun2015-05-31
| | | | | | | | | | | | | | Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org> CC: libav-stable@libav.org
* | avformat/mov: Also export loci altitudeMichael Niedermayer2015-05-30
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mov: Append place name instead of overwriting for lociMichael Niedermayer2015-05-30
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mov: fix DTS calculation for samples with negative stts durationAndreas Cadhalpun2015-05-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A negative sample duration is invalid according to the spec, but there are samples that use it for the DTS calculation, e.g.: http://files.1f0.de/samples/mp4-negative-stts-problem.mp4 These currently get out of A/V sync. Also change the logging type to AV_LOG_WARNING, because decoding the sample can continue. Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | avformat/mov: Avoid float usage in yuv_to_rgba()Michael Niedermayer2015-05-29
| | | | | | | | | | | | This avoids the possibility for rounding/precision differences between platforms Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mov: reject zero bytes_per_frame with non-zero samples_per_frameAndreas Cadhalpun2015-05-26
| | | | | | | | | | | | | | In this case the mov demuxer can return a large number of empty packets. Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | avformat/mov: Mark avio context of decompressed atoms as seekableMichael Niedermayer2015-05-25
| | | | | | | | | | | | Fixes Ticket4329 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mov: always check avio_read return valueAndreas Cadhalpun2015-05-24
| | | | | | | | | | | | | | | | | | If avio_read fails, the buffer can contain uninitialized data. This fixes 'Conditional jump or move depends on uninitialised value(s)' valgrind warnings. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | mov: fix two memleaksAndreas Cadhalpun2015-05-24
| | | | | | | | Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | avformat/mov: check result of avio_seekZhang Rui2015-05-21
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/mov: Tell users about the use_absolute_path option.Carl Eugen Hoyos2015-05-17
| | | | | | | | Fixes ticket #4539.
* | avformat/mov: Fix parsing short lociMichael Niedermayer2015-05-16
| | | | | | | | | | | | Fixes Ticket4557 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mov: Print reason of loci parsing failureMichael Niedermayer2015-05-16
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mov: Use open_cb() if setMichael Niedermayer2015-05-11
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mov: Pass MovContext into mov_open_dref()Michael Niedermayer2015-05-11
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mov: Do not read ACLR into extradata for H.264Michael Niedermayer2015-04-30
| | | | | | | | | | | | | | Fixes regression decoding AVCI Fixes Ticket4493 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mov.c: Use %d to print an enum, not PRIu8Chris Watkins2015-04-21
| | | | | | | | | | | | | | | | | | | | Using the PRIu8 format specifier to print an enum value causes a compiler warning, so use %d instead. Fixes ticket #4467. Signed-off-by: Chris Watkins <watk@chromium.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mov: remove per packet timestamp print trace, theres generic code ↵Michael Niedermayer2015-04-20
| | | | | | | | | | | | doing this in utils.c Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '9286de045968ad456d4e752651eec22de5e89060'Michael Niedermayer2015-04-20
|\| | | | | | | | | | | | | | | | | | | * commit '9286de045968ad456d4e752651eec22de5e89060': mov: Double-check that alias path is not an absolute path Conflicts: libavformat/mov.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mov: Double-check that alias path is not an absolute pathVittorio Giovara2015-04-19
| | | | | | | | | | | | | | nlvl_to and nlvl_from can be set to 1 if both alias and target files are in the same directory, so actually check the first character of the string. We can do this because MacOS filepaths (alis type 2) are always converted to UNIX filepaths (alis type 18).
* | Merge commit '376589e5dd72aa2dd42500f456fca303fcdcad85'Michael Niedermayer2015-04-20
|\| | | | | | | | | | | | | * commit '376589e5dd72aa2dd42500f456fca303fcdcad85': mov: Read alternate absolute path in dref alis Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mov: Read alternate absolute path in dref alisVittorio Giovara2015-04-19
| | | | | | | | | | | | | | Absolute paths can be stored in alis type 2 and 18 according to my research: the first is the canonical MacOS filepath, with path level separated by colons, and the volume name within the filepath, while the second should be the absolute filesystem path from the mount point.
* | Merge commit '1a3eb042c704dea190c644def5b32c9cee8832b8'Michael Niedermayer2015-04-20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '1a3eb042c704dea190c644def5b32c9cee8832b8': Replace av_dlog with normal av_log at trace level Conflicts: ffplay.c libavdevice/fbdev_dec.c libavfilter/avfilter.c libavfilter/internal.h libavfilter/setpts.c libavfilter/src_movie.c libavfilter/vf_crop.c libavfilter/vf_drawtext.c libavfilter/vf_fieldorder.c libavformat/assdec.c libavformat/avidec.c libavformat/flvdec.c libavformat/http.c libavformat/ipmovie.c libavformat/isom.c libavformat/mov.c libavformat/mpegenc.c libavformat/mpegts.c libavformat/mpegtsenc.c libavformat/mux.c libavformat/mxfdec.c libavformat/nsvdec.c libavformat/oggdec.c libavformat/r3d.c libavformat/rtspdec.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace av_dlog with normal av_log at trace levelVittorio Giovara2015-04-19
| | | | | | | | This applies to every library where performance is not critical.
* | Merge commit 'be089af38f65dc8b1fe3564f98020fc815577edb'Michael Niedermayer2015-04-09
|\| | | | | | | | | | | | | | | | | | | | | * 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-09
| | | | | | | | | | | | | | | | 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-04
| | | | | | | | Fixes ticket #4425.
* | avformat/mov: check color parameter type explicitly.Jochen Strunk2015-03-24
| | | | | | | | | | | | | | | | | | | | | | 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-24
|\| | | | | | | | | | | | | | | | | | | | | * 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-23
| | | | | | | | | | | | | | | | | | | | 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-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | | | | | | | 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-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | 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-16
| | | | | | | | | | | | | | | | 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-14
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mov: Use sizeof(filename) instead of a literal numberMichael Niedermayer2015-03-14
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '91eee2af87278b3c2008f7a86d2cdfe6934e9f42'Michael Niedermayer2015-03-02
|\| | | | | | | | | | | | | | | | | | | * 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-02
| | | | | | | | | | | | | | | | | | | | | | 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-02
| | | | | | | | | | | | | | | | 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-27
| | | | | | | | | | | | The type is int64_t. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mov: Check ctts_count before useMichael Niedermayer2015-02-25
| | | | | | | | | | | | | | | | 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>