summaryrefslogtreecommitdiff
path: root/libavformat/mov.c
Commit message (Collapse)AuthorAge
* Use correct msvc type specifiers for ptrdiff_t and size_t.Carl Eugen Hoyos2016-03-09
|
* mov - support seek in encrypted mp4erankor2016-03-06
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/mov: Set display aspect ratio for avid dv.Carl Eugen Hoyos2016-03-02
| | | | Fixes ticket #5271.
* avformat/mov: do not leak memory on ffio_read_size failureMarton Balint2016-02-28
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mov: merge mov_read_custom functionsMarton Balint2016-02-28
| | | | | | | | | This also fixes reading gapless metadata when the entries do not start with the mean atom. Such samples can be found here: https://hydrogenaud.io/index.php/topic,93310.0.html Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
* lavf/mov: downgrade sidx errors to non-fatal warnings; fixes trac #5216Rodger Combs2016-02-28
|
* lavf/mov: fix sidx with edit listsRodger Combs2016-02-28
|
* Revert "Merge commit '3ef98937f512184f80d3bd30015f5ec83dc11eb0'"Michael Niedermayer2016-02-24
| | | | | | | | | | This broke packed_maindata.mp3.mp4 Its unknown to me what this commit would have fixed Reviewed-by: James Almer <jamrial@gmail.com> This reverts commit 79127dbbeffa87243c92af2befc09ad63bcbd1a1, reversing changes made to 9fad1ce7c95adeec440f51af77f730340a6d27b8.
* Merge commit '3ef98937f512184f80d3bd30015f5ec83dc11eb0'Derek Buitenhuis2016-02-24
|\ | | | | | | | | | | | | * commit '3ef98937f512184f80d3bd30015f5ec83dc11eb0': mov: Force the full parsing of mp3 Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * mov: Force the full parsing of mp3Luca Barbato2016-02-19
| | | | | | | | | | | | | | | | | | | | | | Some muxer might or might not fit incomplete mp3 frames in their packets. Bug-Id: 899 CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | Merge commit 'b92962436bdcfae478c8598dca397a397762eef8'Derek Buitenhuis2016-02-24
|\| | | | | | | | | | | | | * commit 'b92962436bdcfae478c8598dca397a397762eef8': mov: Fix the format specifier type for size Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * mov: Fix the format specifier type for sizeVittorio Giovara2016-02-16
| | | | | | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | mov: Fix leftover merge conflict cruftDerek Buitenhuis2016-02-16
| | | | | | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | Merge commit '5eb562831b3a9bea8026c413ef1338e06450d005'Derek Buitenhuis2016-02-16
|\| | | | | | | | | | | | | | | | | This commit is a no-op. * commit '5eb562831b3a9bea8026c413ef1338e06450d005': mov: Use the correct type for size Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * mov: Use the correct type for sizeLuca Barbato2016-02-14
| | | | | | | | | | | | An AVIO offset is int64_t. Bug-Id: 921
* | Merge commit '9f61abc8111c7c43f49ca012e957a108b9cc7610'Derek Buitenhuis2016-02-10
|\| | | | | | | | | | | | | | | | | This also deprecates our old duplicated callbacks. * commit '9f61abc8111c7c43f49ca012e957a108b9cc7610': lavf: allow custom IO for all files Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavf: allow custom IO for all filesAnton Khirnov2016-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some (de)muxers open additional files beyond the main IO context. Currently, they call avio_open() directly, which prevents the caller from using custom IO for such streams. This commit adds callbacks to AVFormatContext that default to avio_open2()/avio_close(), but can be overridden by the caller. All muxers and demuxers using AVIO are switched to using those callbacks instead of calling avio_open()/avio_close() directly. (de)muxers that use the URLProtocol layer directly instead of AVIO remain unconverted for now. This should be fixed in later commits.
| * mov: Add an option to toggle dref openingDerek Buitenhuis2016-01-21
| | | | | | | | | | | | | | | | | | This feature is mostly only used by NLE software, and is both of dubious value being enabled by default, and a possible security risk. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | lavf/mov: Extend extracting XMP in mov files using UUID BoxThierry Foucu2016-02-09
| | | | | | | | | | | | | | | | | | The UUID is based on http://www.adobe.com/devnet/xmp.html The patch is made according to XMP SPECIFICATION PART 3 - STORAGE IN FILES See Table 8 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/mov: dont print frma warning when format is the sameEran Kornblau2016-02-05
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | mov: Add an option to toggle dref openingDerek Buitenhuis2016-01-20
| | | | | | | | | | | | | | | | | | This feature is mostly only used by NLE software, and is both of dubious value being enabled by default, and a possible security risk. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf/mov: Don't limit fourcc 0 -> raw/twos to version 0 sample descriptionsMats Peterson2016-01-16
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf/mov: Confine 0x00000000 to raw/twos fourcc mapping to version 0 sample ↵Mats Peterson2016-01-15
| | | | | | | | | | | | | | | | | | | | descriptions Confine the 0x00000000 to 'raw '/'twos' fourcc mapping to old version 0 sound sample descriptions, since they are the only valid sample descriptions for this type of mapping. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/mov: Simplify format checking codeMichael Niedermayer2016-01-08
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavf/mov: Audio and fourcc 0x00000000Mats Peterson2016-01-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In many older QuickTime files, the audio format, or "fourcc", is 0x00000000. The QuickTime File Format Specification states the following regarding this situation: "This format descriptor should not be used, but may be found in some files. Samples are assumed to be stored in either 'raw ' or 'twos' format, depending on the sample size field in the sound description." MPlayer handles this logic by itself, but FFmpeg/FFplay currently does not. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/mov: support cenc (common encryption)erankor2015-12-31
| | | | | | | | | | | | | | | | | | | | support reading encrypted mp4 using aes-ctr, conforming to ISO/IEC 23001-7. a new parameter was added: - decryption_key - 128 bit decryption key (hex) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat: factor ff_get_qtpalette() out of mov.cMats Peterson2015-12-28
| | | | | | | | | | | | | | | | | | This consists mainly of moving the palette handling from the mov_parse_stsd_video() function to a new ff_get_qtpalette() function in the new file qtpalette.c, which will be shared by both matroskadec.c and mov.c. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/mov: Update handbrake_version threshold for full mp3 parsingMichael Niedermayer2015-12-22
| | | | | | | | | | | | Fixes: Endangered\ Species\ 1x01\ Collecting\ Merl.mp4 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat/mov: Enable parser for mp3s by old HandBrakeMichael Niedermayer2015-12-13
| | | | | | | | | | | | Fixes Ticket5047 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | libavformat/mov.c: allow QuickTime metadata to come after traksNeil Birkbeck2015-12-05
| | | | | | | | | | | | | | QuickTime metadata can come after trak data. Add indicator for which trak is being parsed (-1 if none) so that global metadata after the trak can be parsed. Signed-off-by: Neil Birkbeck <neil.birkbeck@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avformat: use AV_OPT_TYPE_BOOL in a bunch of placesClément Bœsch2015-12-04
| |
* | avformat/mov: use hypot()Ganesh Ajjanagadde2015-11-22
| | | | | | | | | | | | | | This simplifies the code. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | Merge commit '7f4ec4364bc4a73036660c1c6a3c4801db524e9e'Derek Buitenhuis2015-11-22
|\| | | | | | | | | | | | | | | | | | | * commit '7f4ec4364bc4a73036660c1c6a3c4801db524e9e': avformat: expose av_stream_new_side_data helper Conflicts: libavformat/internal.h Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * avformat: expose av_stream_new_side_data helperJohn Stebbins2015-11-18
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit 'b5f963bfec1f452c37eee900c7b11f065d10dd60'Derek Buitenhuis2015-11-19
|\| | | | | | | | | | | | | * commit 'b5f963bfec1f452c37eee900c7b11f065d10dd60': mov: Drop dref when unable to parse Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * mov: Drop dref when unable to parseVittorio Giovara2015-11-12
| | | | | | | | | | | | | | Some entries might be either empty or contain types we do not parse (eg. 'url '). In both cases, if an 'alis' is not the first entry, external references are not loaded, so make sure that the array starts with an 'alis' dref.
* | Merge commit '303f931938c618668f7f83c646a1850bef84641e'Derek Buitenhuis2015-11-19
|\| | | | | | | | | | | | | * commit '303f931938c618668f7f83c646a1850bef84641e': mov: Correctly store dref paths Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * mov: Correctly store dref pathsVittorio Giovara2015-11-12
| | | | | | | | | | | | | | | | | | | | Rather than reading the alternate absolute path version from dref type 18, make sure that 0s are considered as '/'. These values are sometimes present in the full path, and are mistakenly interpreted as line terminators othewise. With the correct handling of this dref type, parsing type 18 is not needed any more.
* | avformat/mov: remove redundant assignmentGanesh Ajjanagadde2015-11-16
| | | | | | | | | | | | | | | | | | | | This is possibly undefined behavior based on sequence point rules, but I have not studied the spec at that level of detail. Fixes: CID 1338321. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | avformat/mov: fix memory leakGanesh Ajjanagadde2015-11-16
| | | | | | | | | | | | | | Fixes: CID 1338328. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | avformat/mov: Add option to ignore chapters during parsingBryan Huh2015-11-10
| | | | | | | | | | | | | | | | | | | | Chapter-indexing can be expensive since chapters may be interspersed throughout the entire file and may require many seeks - especially costly when consuming a video over a remote protocol like http. Furthermore it is often unnecessary, especially when only trying to get video info (e.g. via ffprobe). Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit 'f128b8e19ac7f702adae899ab91cc1e80f238761'Hendrik Leppkes2015-11-10
|\| | | | | | | | | | | | | * commit 'f128b8e19ac7f702adae899ab91cc1e80f238761': mov: detect cover art pictures by content Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * mov: detect cover art pictures by contentwm42015-11-03
| | | | | | | | | | | | | | | | | | | | | | | | I've got some m4a samples that had jpeg cover art marked as png. Since these files were supposedly written by iTunes, and other software can read it (e.g. clementine does), this should be worked around. Since png has a very simple to detect header, while it's apparently a real pain to detect jpeg in the general case, try to detect png and assume jpeg otherwise. Not bothering with bmp, as I have no test case. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * lavc: Make AVPacket.duration int64, and deprecate convergence_durationwm42015-09-29
| | | | | | | | | | | | | | | | | | Note that convergence_duration had another meaning, one which was in practice never used. The only real use for it was a 64 bit replacement for the duration field. It's better just to make duration 64 bits, and to get rid of it. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | mov: Add support parsing QuickTime Metadata Keys.Tinglin Liu2015-10-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Apple dev specification: https://developer.apple.com/library/mac/documentation/QuickTime/QTFF/Metadata/Metadata.html Basically the structure is like: |--meta |----hdlr |----keys |----ilst 1) The handler type in the metadata handler atom is ‘mdta’. 2) The key and value are stored separately for each key-value pair. The 'keys' atom stores the key table, while 'ilst' atom stores the values corresponding to the indices in the key table. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | avformat/mov: Autodetect mp3s which need parsingMichael Niedermayer2015-10-23
| | | | | | | | | | | | | | | | | | | | mp3 packets all have the same duration and number of samples if their duration indicated in the container varies then thats an indication that they are not 1 mp3 packet each. If this autodetection fails for some case then please contact us and provide a testcase. Fixes Ticket4938
* | avformat/mov: fix integer overflowGanesh Ajjanagadde2015-10-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Partially fixes Ticket 4727. -duration is not a safe expression, since duration can be INT_MIN. One might ask how it can become INT_MIN. Although it is true that line 2574 is no longer reached with INT_MIN due to commit 053e80f6eaf8d87521fe58ea96886b6ee0bbe59d (which fixed another integer overflow issue), mov_update_dts_shift is called on line 3549 as well, right after a read of untrusted data. One can do the fix locally there, but that function is already a huge mess. Changing mov_update_dts_shift is likely better. This changes duration to INT_MIN + 1 in such cases. This should not make any practical difference since such streams are anyway fuzzer files. Tested with FATE. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | lavf/mov: add support for sidx fragment indexesRodger Combs2015-10-09
| | | | | | | | Fixes trac #3842
* | doc: fix spelling errorsAndreas Cadhalpun2015-10-09
| | | | | | | | | | Reviewed-by: Lou Logan <lou@lrcd.com> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | libavformat/mov.c: Add parsing for DDTS atom for DTS audioShawn Singh2015-09-30
| | | | | | | | | | | | | | | | | | The DDTS atom is defined in ETSI TS 102 114, v1.4.1, Annex E. This is useful for DTS-HD formats, some of which cannot be decoded by dcadec.c or libdcadec. Signed-off-by: Shawn Singh <shawnsingh@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>