summaryrefslogtreecommitdiff
path: root/libavformat/mov.c
Commit message (Collapse)AuthorAge
* avformat: add AVFormatContext to ff_get_extradata()Paul B Mahol2016-04-14
| | | | | | Needed for av_log() inside that function. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* Merge commit '7e01d48cfd168c3dfc663f03a3b6a98e0ecba328'Derek Buitenhuis2016-04-13
|\ | | | | | | | | | | | | * commit '7e01d48cfd168c3dfc663f03a3b6a98e0ecba328': mov: Check the entries value when parsing dref boxes Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * mov: Check the entries value when parsing dref boxesLuca Barbato2016-03-11
| | | | | | | | | | | | | | | | | | And properly reset the entries count when resetting the entries. CC: libav-stable@libav.org Bug-Id: 929 Bug-Id: CVE-2016-3062
* | Merge commit 'd40cb726d271b0284642a1ba159eb26a5c579f77'Derek Buitenhuis2016-04-13
|\| | | | | | | | | | | | | * commit 'd40cb726d271b0284642a1ba159eb26a5c579f77': mov: Trim dref absolute path Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * mov: Trim dref absolute pathVittorio Giovara2016-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | Samples produced by Omneon (Harmonic) store external references with paths ending with 0s. Such movs cannot be loaded properly since every 0 is converted to '/', to keep the same parsing code for dref type 2 and type 18: this makes the external reference point to a non-existing direactory, rather than to the actual referenced file. Add a brief trimming loop that drops all ending 0s before trying to parse the external reference path. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit '9200514ad8717c63f82101dc394f4378854325bf'Derek Buitenhuis2016-04-10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '9200514ad8717c63f82101dc394f4378854325bf': lavf: replace AVStream.codec with AVStream.codecpar This has been a HUGE effort from: - Derek Buitenhuis <derek.buitenhuis@gmail.com> - Hendrik Leppkes <h.leppkes@gmail.com> - wm4 <nfxjfg@googlemail.com> - Clément Bœsch <clement@stupeflix.com> - James Almer <jamrial@gmail.com> - Michael Niedermayer <michael@niedermayer.cc> - Rostislav Pehlivanov <atomnuker@gmail.com> Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * 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.
* | avformat/mov: read start_pad from edit list start time if codec is aacMarton Balint2016-03-20
| | | | | | | | | | | | | | | | Related to ticket #2324, #2325. Stream duration still need to be fixed... Signed-off-by: Marton Balint <cus@passwd.hu>
* | 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>