Commit Graph

10830 Commits

Author SHA1 Message Date
Derek Buitenhuis 8db804e8f5 mov: Remove old b-frame/video delay heuristic
This was added before edts support existed, and is no longer
valid.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-08-29 15:31:03 +02:00
Derek Buitenhuis eb96505b76 mov: Remove ancient heuristic hack
This breaks files with legitimate single-entry edit lists,
and the hack, introduced in f03a081df0,
has no link to any known sample in its commit message.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-08-29 15:31:03 +02:00
Luca Barbato d42809f983 av1: Add codec_id and basic demuxing support
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-08-24 14:45:08 +02:00
Luca Barbato 24130234cd rtpdec_mpeg4: validate fmtp fields 2016-08-23 18:58:10 +02:00
Diego Biurrun be3363f664 nsv: Drop disabled cruft 2016-08-17 12:16:42 +02:00
Diego Biurrun a4b1b5aa28 wc3movie: Drop unused cruft 2016-08-17 12:16:42 +02:00
Diego Biurrun d9442d1303 rm: Drop broken disabled cruft 2016-08-17 12:16:42 +02:00
Diego Biurrun 0638b99cdb aiff: Skip padding byte for odd-sized chunks
Bug-Id: 660
2016-08-10 11:58:38 +02:00
Michael Niedermayer e5b019725f m4vdec: Check for non-startcode 00 00 00 sequences in probe
This makes the m4v detection less trigger-happy.

Bug-Id: 949
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-08-03 08:27:02 +02:00
Martin Storsjö 9806b9ab5c Revert "Don't use expressions with side effects in macro parameters"
This reverts commit 25bacd0a0c.

Since 230b1c070, the bytewise AV_W*() macros only expand their
argument once, so revert to the more readable version of these.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-08-02 21:18:12 +03:00
Martin Storsjö 25bacd0a0c Don't use expressions with side effects in macro parameters
AV_WB32 can be implemented as a macro that expands its parameters
multiple times (in case AV_HAVE_FAST_UNALIGNED isn't set and the
compiler doesn't support GCC attributes); make sure not to read
multiple times from the source in this case.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-31 22:50:51 +03:00
Anton Khirnov ed1cd81076 flac demuxer: improve probing
Extend the probe function to validate the STREAMINFO block that must
follow the fLaC ID tag.
2016-07-31 08:19:45 +02:00
Anton Khirnov 5ebef79abe Fix instances of broken indentation found by gcc 6 2016-07-31 08:19:27 +02:00
Luca Barbato 2ac00d2d1d mov: Validate the ID number
IDs in MOV start from 1.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-07-29 18:46:48 +02:00
Hendrik Leppkes 7f549b8338 riff: don't overwrite bps from WAVEFORMATEX if EXTENSIBLE doesn't contain that data.
According to the specification on the MSDN [1], 0 is valid for that
particular field, and it should be ignored in that case.

[1]: http://msdn.microsoft.com/en-us/library/windows/desktop/dd757714(v=vs.85).aspx

Bug-Id: 950

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-07-22 19:08:12 +02:00
Vittorio Giovara ed9b2a5178 mov: Rework the check for invalid indexes in stsc
There are samples with invalid stsc that may work fine as is and
do not need extradata change. So ignore any out of range index, and
error out only when explode is set.

Found-by: Matthieu Bouron <matthieu.bouron@stupeflix.com>

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-07-20 19:30:22 +02:00
Vittorio Giovara 90bc423212 mov: Wrap stsc index and count compare in a separate function 2016-07-20 19:30:21 +02:00
Matthieu Bouron 209ee680ce mov: Fix stsc_count comparison
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-07-20 19:28:35 +02:00
Anton Khirnov 46278ec90a mp3enc: write trailing padding 2016-07-15 15:30:30 +02:00
Anton Khirnov d60c2d5216 mp3dec: read the initial/trailing padding from the LAME tag 2016-07-15 15:30:22 +02:00
Matthieu Bouron 61cb9fac47 mov: fix stream extradata_size allocation
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-15 13:27:43 +03:00
Martin Storsjö 4f7723cb3b movenc: Add an option for skipping writing the mfra/tfra/mfro trailer
When writing a fragmented file, we by default write an index pointing
to all the fragments at the end of the file. This causes constantly
increasing memory usage during the muxing. For live streams, the
index might not be useful at all.

A similar fragment index is written (but at the start of the file) if
the global_sidx flag is set. If ism_lookahead is set, we need to keep
data about the last ism_lookahead+1 fragments.

If no fragment index is to be written, we don't need to store information
about all fragments, avoiding increasing the memory consumption
linearly with the muxing runtime.

This fixes out of memory situations with long live mp4 streams.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-08 14:11:15 +03:00
Anton Khirnov 40f74dc87a matroskadec: export CodecDelay 2016-07-03 09:13:29 +02:00
Anton Khirnov be3e807c8f oggparseopus: export pre-skip
Bug-Id: 945, along with the following commit
2016-07-02 09:30:40 +02:00
Vittorio Giovara 029cf99c51 mov: Save number of stsd elements after stream extradata allocation
Avoid freeing an unallocated array in mov_read_close() in case
of a malloc failure.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-06-29 15:25:42 -04:00
Diego Biurrun e72d6fa08a build: Move MP2 muxer declaration away from MP3 muxer code
The MP2 muxer uses none of the code of the MP3 muxer.
2016-06-29 20:24:10 +02:00
Martin Storsjö 785c25443b movenc: Apply offsets on timestamps when peeking into interleaving queues
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-06-28 14:16:06 +03:00
Luca Barbato 4dbfcd0757 librtmp: Avoid an infiniloop setting connection arguments
The exit condition was missing.

CC: libav-stable@libav.org
2016-06-22 06:37:33 +02:00
Paul B Mahol 470cd0c5fe Add TrueMotion 2.0 Real Time decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-06-20 15:48:12 -04:00
Paul B Mahol d78fd2fa21 Add MagicYUV decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-06-20 15:45:51 -04:00
Vittorio Giovara 846a3e78a5 mov: Support prores with multiple stsd
This function needs to return false, or data in the additional tables
will be skipped, and the decoder will not be able to decode frames
associated with them.
2016-06-17 11:38:33 -04:00
Vittorio Giovara 7672997004 mov: Implement support for multiple sample description tables
Store data from each stsd in a separate extradata buffer, keep track of
the stsc index for read and seek operations, switch buffers when the
index differs. Decoder is notified with an AV_PKT_DATA_NEW_EXTRADATA
packet side data.

Since H264 supports this notification, and can be reset midstream, enable
this feature only for multiple avcC's. All other stsd types (such as
hvc1 and hev1) need decoder-side changes, so they are left disabled for
now.

This is implemented only in non-fragmented MOVs.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-06-17 11:38:33 -04:00
Diego Biurrun b668662939 get_bits: Move BITSTREAM_READER_LE definition before all relevant #includes
This avoids the danger that get_bits.h might get indirectly #included before
BITSTREAM_READER_LE is defined.

Also sort headers into canonical order where appropriate.
2016-06-07 13:09:57 +02:00
Diego Biurrun b7f98659f2 Remove unnecessary get_bits.h #includes 2016-06-07 13:09:57 +02:00
Diego Biurrun 535a742c26 build: Change structure of the linker version script templates
Split version files into one line per symbol/directive to allow compatibility
with the Solaris linker without preprocessing and eliminate $ from version file
templates to simplify the postprocessing shell command.
2016-05-29 16:43:11 +02:00
Martin Storsjö 3fdffc032e rtsp: Use avcodec_descriptor_get instead of avcodec_find_decoder
This is only used for logging a human readable codec name for
debugging.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-25 12:22:28 +03:00
Anton Khirnov 14634429b9 lavf: update muxing doxy
Describe the new AVCodecParameters API.
2016-05-23 06:46:17 +02:00
Diego Biurrun e45a638f50 dump: Drop unused variable 2016-05-22 20:22:43 +02:00
Martin Storsjö b84f3a4003 movenc: Write 'loci' geotag metadata for 3gp and mp4
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-19 10:46:55 +03:00
Martin Storsjö f12a705ee5 movenc: Factorize a function for finding a metadata entry and the associated language
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-19 10:46:54 +03:00
Michael Niedermayer daec1651f1 movenc: Write ?xyz geotag metadata for mov files
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-19 10:46:53 +03:00
Michael Niedermayer bc43131997 mov: Also export loci altitude
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-19 10:46:53 +03:00
Michael Niedermayer 94d8141c8c mov: Append place name instead of overwriting for loci
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-19 10:46:52 +03:00
Michael Niedermayer f126365cda mov: Fix parsing short loci
Previously, we required the minimum number of bytes required for
the full box. Don't strictly require the astronomical body and additional
notes fields, but do require an altitude field (which currently isn't
parsed). This matches the initial length check at the start of the function
(which doesn't know about the variable length place field).

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-19 10:46:51 +03:00
Michael Niedermayer 704d2bd18b mov: Print reason of loci parsing failure
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-19 10:46:45 +03:00
Martin Storsjö d34826c33d mov: Add a comment referring to the standard that defines the loci box
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-19 10:46:39 +03:00
Martin Storsjö 72d621069f movenc: Add a missed const
This was missed in e1eb0fc960, when ff_interleaved_peek was
changed to include const during the evolution of the patch.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-18 21:59:48 +03:00
Martin Storsjö a79aafd0b4 movenc: Add a test for VFR with b-frames, with a duration change at a fragment end
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-18 10:37:05 +03:00
Martin Storsjö e1eb0fc960 movenc: Use packets in interleaving queues for the duration at the end of fragments
As long as caller only writes packets using av_interleaved_write_frame
with no manual flushing, this should allow us to always have accurate
durations at the end of fragments, since there should be at least
one queued packet in each stream (except for the stream where the
current packet is being written, but if the muxer itself does the
cutting of fragments, it also has info about the next packet for that
stream).

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-18 10:37:03 +03:00
Martin Storsjö fd4957d9c6 movenc-test: Test write_data_type
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-05-18 10:37:00 +03:00