summaryrefslogtreecommitdiff
path: root/libavformat/mov.c
Commit message (Collapse)AuthorAge
* mov: Parse EC3SpecificBox (dec3 atom).Yusuke Nakamura2012-04-27
| | | | | | | | Skip to parse fields for additional independent substreams and its associated dependent substreams since libavcodec's E-AC-3 decoder does not support them yet. Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* mov: Treat keyframe indexes as 1-origin if starting at non-zero.Yusuke Nakamura2012-04-21
| | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* mov: Take stps entries into consideration also about key_off.Yusuke Nakamura2012-04-21
| | | | | | Splitted files don't start always from a sync sample. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* mov: free memory on header parsing failureDale Curtis2012-04-14
| | | | | | Call mov_read_close when mov_read_header fails. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mov: fix leaking memory with multiple drefs.Dale Curtis2012-04-14
| | | | | | | | | Instead of allocating over the original, free first. MOVStreamContext is zero initialized so no double free will occur. Same style as other fixes for the same problem in this file. Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mov: Fix detecting there is no sync sample.Yusuke Nakamura2012-04-13
| | | | | | Stss atom without entries doesn't mean every sample is a sync sample. Signed-off-by: Martin Storsjö <martin@martin.st>
* mov: don't overwrite existing indexes.Ronald S. Bultje2012-03-29
| | | | | | | | Prevents all kind of badness if files contain multiple indexes. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* mov: Do not read past the end of the ctts_data table.Alex Converse2012-03-22
| | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* mov: Allow last chunk to have an arbitrary number of samples.Carl Eugen Hoyos2012-03-06
| | | | | | | Fixes ticket #673. (cherry picked from commit 8dcd2a41ecff8cc1e9b20cc267df54c59878ab3b) Signed-off-by: Alex Converse <alex.converse@gmail.com>
* mov: do not set AVCodecContext.frame_sizeJustin Ruggles2012-03-05
| | | | It is not necessary.
* lavc: deprecate AVCodecContext.color_table_id.Anton Khirnov2012-02-29
| | | | | It's currently only used as temporary storage by the mov demuxer. Make it use a local variable instead.
* mov: set channel layout for AC-3 streams based on the 'dac3' atom infoJustin Ruggles2012-02-22
| | | | fixes Bug 225
* movdec: Don't parse all fragments if ignidx is setMartin Storsjö2012-02-22
| | | | | | | | | | In nonseekable files, we already stop parsing the toplevel atoms after finding moov and one mdat. In large seekable files (or files that are seekable, but slowly, e.g. http), reading all the fragments at the start can take a considerable amount of time. This allows opting out from this behaviour. Signed-off-by: Martin Storsjö <martin@martin.st>
* movdec: Restart parsing root-level atoms at the right spotMartin Storsjö2012-02-22
| | | | | | | | | | | If parsing moov+mdat in a non-seekable file, we currently abort parsing directly after parsing the header of the mdat atom. If we want to continue parsing later (if looking to parse later fragments), we need to skip past the content of the mdat atom, otherwise we end up parsing the content of the mdat atom as root level atoms. Signed-off-by: Martin Storsjö <martin@martin.st>
* movdec: Adjust keyframe flagging in fragmented filesMartin Storsjö2012-02-21
| | | | | | | | | | | | | | For video, mark the first sample in a trun which doesn't have the sample-is-non-sync-sample flag set as a keyframe. In particular, the "sample does not depend on other samples" flag isn't enough to make it a keyframe, since later frames still can reference frames prior to that one (the flag only says that that particular frame doesn't depend on other frames). This fixes bug 215. Signed-off-by: Martin Storsjö <martin@martin.st>
* mov: Use defines for sample flags in fragmentsMartin Storsjö2012-02-18
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* mov: Use defines for trun flagsMartin Storsjö2012-02-18
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* mov: Use defines for tfhd flagsMartin Storsjö2012-02-18
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* libavformat: Add an ff_ prefix to some lavf internal symbolsMartin Storsjö2012-02-15
| | | | | | | | | | Prefix the functions/tables brktimegm, pcm_read_seek, dv_offset_reset, voc_get_packet, codec_movaudio_tags, codec_movvideo_tags. After this, lavf has no global symbols without the proper prefix. Signed-off-by: Martin Storsjö <martin@martin.st>
* movdec: Avoid av_malloc(0) in stssAlex Converse2012-02-03
| | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
* movdec: Parse the dvc1 atomMartin Storsjö2012-02-02
| | | | | | | | | | Normally, the actual payload data contains sequence headers, too, and the parser can extract this and set it as extradata. However, the data in the dvc1 atom is the "official" extradata for the file. This is required for proper stream copy of vc1 from ismv to ismv. Signed-off-by: Martin Storsjö <martin@martin.st>
* movdec: fix dts generation in fragmented filesJanne Grunau2012-02-02
| | | | | | | Do not use AVStream's duration for dts generation since it contains in some cases the duration of the whole file instead of duration of the samples in the moov. This happens if the mdhd holds the duration of the whole file but has no entries or a zero duration in its stts.
* movdec: Ignore sample_degradation_priority bits when checking first_sample_flagsMartin Storsjö2012-01-31
| | | | | | | | | | | This makes the first packet of a track fragment run to get the keyframe flag set properly if sample_degradation_priority is nonzero. This makes the keyframes flag be set properly for ismv files created by Microsoft. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: remove AVFormatParameters from AVFormatContext.read_header signatureAnton Khirnov2012-01-27
|
* movdec: Calculate an average bit rate for fragmented streams, tooMartin Storsjö2012-01-25
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* mov: Remove dead stores for spherical coordinates for channel position.Alex Converse2012-01-18
|
* mov, mxfdec: Employ more meaningful return values.Daniel Huang2012-01-15
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* mov: Support MOV_CH_LAYOUT_USE_DESCRIPTIONS for labeled descriptions.Alex Converse2012-01-05
|
* mov: Don't stick the QuickTime field ordering atom in extradata.Alex Converse2011-12-21
| | | | | | The 'fiel' atoms can be found in H.264 tracks clobbering the extradata. MJPEG supports non field based extradata, and this data should be preserved when copying.
* lavu: replace int/float punning functionsMans Rullgard2011-12-11
| | | | | | | | | | | | | | | | | | The existing functions defined in intfloat_readwrite.[ch] are both slow and incorrect (infinities are not handled). This introduces a new header with fast, inline conversion functions using direct union punning assuming an IEEE-754 system, an assumption already made throughout the code. The one use of Intel/Motorola extended 80-bit format is replaced by simpler code sufficient under the present constraints (positive normal values). The old functions are marked deprecated and retained for compatibility. Signed-off-by: Mans Rullgard <mans@mansr.com>
* mov: add support for reading and writing the 'chan' tagJustin Ruggles2011-12-09
| | | | | | This implements reading the tag in the demuxer and adds support for writing it in the muxer. Some example channel layout tables for muxing are included for ac3, aac, and alac, but they are not utilized yet.
* mov: Don't av_malloc(0).Alex Converse2011-12-05
| | | | | | | malloc() is allowed to return NULL when zero is the argument. This causes us to think malloc has failed and return AVERROR(ENOMEM). In addition OS X malloc() returns an unfreeable non-NULL pointer for size zero when alignment is greater than 16.
* mov: Allow empty stts atom.Alex Converse2011-12-04
| | | | Fixes regressions caused by 30c3d976
* lavf: make av_set_pts_info private.Anton Khirnov2011-11-30
| | | | It's supposed to be called only from (de)muxers.
* mov: Make format string match variable type.Alex Converse2011-11-26
|
* mov: Remove some redundant and obsolete comments.Alex Converse2011-11-22
|
* avformat: Use avio_open2, pass the AVFormatContext interrupt_callback onwardsMartin Storsjö2011-11-13
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* movdec: Set frame_size for AMRCarl Eugen Hoyos2011-11-05
| | | | | | | | | | | | | | Earlier, sc->samples_per_frame was used for setting the frame size, but all files don't have that set properly. The frame size is a known constant for these codecs. If frame_size isn't set, the mov/3gp muxer refuses to mux it. This fixes stream copy of audio from https://roundup.libav.org/file1248/Video_With_AMR-NB_Audio.3gp to another 3gp file (roundup issue 2468). Signed-off-by: Martin Storsjö <martin@martin.st>
* mov: Avoid divide by zero in edit list dts handlingBenjamin Larsson2011-10-29
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* mov: add support for hdvd and pgapmetadata atomsRaivo Hool2011-10-21
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* mov: rename function _stik, some indentation cosmeticsRaivo Hool2011-10-21
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* mov: rename function _int8 to remove ambiguity, some indentation cosmeticsRaivo Hool2011-10-21
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* mov: parse the gnre atomRaivo Hool2011-10-21
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavf: use avpriv_ prefix for some dv functions.Anton Khirnov2011-10-20
| | | | They are used in libavdevice.
* lavf: use avpriv_ prefix for ff_new_chapter().Anton Khirnov2011-10-20
| | | | It's used in libavdevice.
* lavf: replace av_new_stream->avformat_new_stream part II.Anton Khirnov2011-10-19
| | | | | | | | Manual replacements are done in this commit. In many cases, the id is some constant made up number (e.g. 0 for video and 1 for audio), which is then not used in the demuxer for anything. Those ids are removed.
* mov: add support for TV metadata atoms tves, tvsn and stikRaivo Hool2011-10-17
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* mov: 10l: Terminate string with 0 not '0'Alex Converse2011-10-14
|
* mov: Prevent illegal writes when chapter titles are very short.Alex Converse2011-10-14
|
* mov: do not misreport empty sttsLuca Barbato2011-10-11
| | | | | Return -1 instead of ENOMEM if entries is 0. Fixes a av_malloc(0) crash in macosx.