Commit Graph

10451 Commits

Author SHA1 Message Date
Eric Zimmerman
eb31256f12 g2meet: Support G2M5 codec variant
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-04-19 23:45:35 +01:00
Vittorio Giovara
9286de0459 mov: Double-check that alias path is not an absolute path
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).
2015-04-19 22:50:24 +01:00
Vittorio Giovara
376589e5dd mov: Read alternate absolute path in dref alis
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.
2015-04-19 22:48:14 +01:00
Vittorio Giovara
22526c1f55 Canopus HQ/HQA decoder
Based on work by Kostya Shishkov <kostya.shishkov@gmail.com>.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-04-19 22:37:23 +01:00
Vittorio Giovara
1a3eb042c7 Replace av_dlog with normal av_log at trace level
This applies to every library where performance is not critical.
2015-04-19 12:41:59 +01:00
Thomas Guillem
b8d7f3186e matroskadec: fix crash when parsing invalid mkv
CC: libav-stable@libav.org

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-04-18 16:49:25 +02:00
Diego Biurrun
247aa7af7d avisynth: Simplify shared library name construction 2015-04-15 14:52:57 +02:00
Stephen Hutchinson
7a5f444766 avisynth: Bump minimum required version to interface version 6
The AVSC_API changes in the new headers mean that the 2.6 alphas
are just as incompatible as 2.5 is.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2015-04-14 13:53:04 +02:00
Stephen Hutchinson
a6a45e5a9a avisynth: Fix detection of AviSynth 2.5
In order to safely exit when the user tries to use AviSynth 2.5, the
continue_on_fail value for 2.6's functions need to be set to 1.
Otherwise, the library loader fails before the 'upgrade to 2.6'
log message appears.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2015-04-14 13:52:41 +02:00
Himangi Saraogi
4e54432164 rtsp: Fix unchecked return value
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-04-12 23:08:14 +03:00
Himangi Saraogi
0b72a47f55 rtsp: Check a malloc return value
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-04-12 23:08:13 +03:00
Anders Nystrom
27852f2f1d libavformat: Handle error return from ff_listen_bind
Handle error return from ff_listen_bind without leaking file descriptors.

Signed-off-by: Anders Nystrom <anders.nystrom@southpole.se>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-04-09 14:32:37 +02:00
Vittorio Giovara
783df7d5c5 riff: Add 'M705' FourCC for mpeg2video 2015-04-09 13:52:04 +02:00
Vittorio Giovara
be089af38f mov: Rely on box type rather than file type for colr atom
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>
2015-04-09 13:46:54 +02:00
wm4
c4d37cd9ef matroskadec: export cover art correctly
Generally, libavformat exports cover art pictures as video streams with
1 packet and AV_DISPOSITION_ATTACHED_PIC set. Only matroskadec exported
it as attachment with codec_id set to AV_CODEC_ID_MJPEG.

Obviously, this should be consistent, so change the Matroska demuxer to
export a AV_DISPOSITION_ATTACHED_PIC pseudo video stream.

Matroska muxing is probably incorrect too. I know that it can create
broken files with an audio track and just 1 video frame when e.g.
remuxing mp3 with APIC to mkv. But for now this commit does not change
anything about muxing, and also continues to write attachments with
AV_CODEC_ID_MJPEG should the muxer application have special knowledge
that the Matroska is broken in this way.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-04-08 12:36:53 +02:00
Luca Barbato
27f2746282 parseutils: Make av_small_strptime public
And use it in libavformat.

Based on a similar patch by Stefano Sabatini <stefasab@gmail.com>.
2015-04-07 12:36:11 +02:00
Martin Storsjö
7d097a0fc5 mpegtsenc: Take max_delay into account when buffering multiple audio packets into one PES packet
Make sure we don't buffer up more than max_delay worth of data
before writing a PES packet, even if pes_payload_size is set to
a larger value.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-04-03 14:06:15 +03:00
Luca Barbato
e3ec6fe7bb rtsp: Add a buffer_size option
And forward it to rtp and udp.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-04-01 14:26:35 +02:00
Luca Barbato
8c9c5479c4 rtp: Add an option to set the send/receive buffer size
It gets forwarded down to UDP.
2015-04-01 14:26:35 +02:00
Luca Barbato
3c47e7c435 rtp: Map the urloptions to AVOptions
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-04-01 14:26:35 +02:00
Diego Biurrun
4978850ca2 build: Split JPEG-related tables off into a separate component 2015-03-30 17:51:21 +02:00
Luca Barbato
ff7adead0a udp: Fix pkt_size management
The default value for unset is -1, not 0.

Problem introduced in 66028b7ba6

Bug-Id: 835
2015-03-29 17:35:59 +02:00
Stephen Hutchinson
1188119624 avisynth: update documentation about the avisynth_c.h header
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-03-24 10:31:04 +01:00
Stephen Hutchinson
a8c99205ca avisynth: Fix compilation against current 2.6 header(s).
AviSynth 2.6 (and by extension, AviSynth+) moves these functions
into AVSC_API. This requires both adjusting their normal use,
and for AvxSynth, adjusting the position/use of the USING_AVISYNTH
ifdefs.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-03-24 10:31:04 +01:00
Vittorio Giovara
e4fe535d12 mov: Write the display matrix in order
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.
2015-03-23 20:53:28 +00:00
Martin Storsjö
e0046bc9c9 movenc: Write the make and model metadata keys for mov style files
These are essential allowing QuickTime to keep detecting content
as slow-motion - this allows preserving them on stream copy.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-23 12:43:35 +02:00
Federico Tomassetti
27aa1ff35a oggdec: Check memory allocation
Bug-Id: CID 1257798 / CID 1257805

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-03-21 23:18:15 +01:00
Federico Tomassetti
93c1b04abf mms: Check memory allocation
Bug-Id: CID 1258462

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-03-21 23:18:15 +01:00
Federico Tomassetti
d3aa307da0 rmenc: Check memory allocation
Bug-Id: CID 1257832

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-03-21 23:18:14 +01:00
Anton Khirnov
cf18e777ae movenc: write the display transform matrix 2015-03-19 21:02:59 +01:00
Martin Storsjö
67a2912307 movenc: Don't assume that fragment durations in pts is equal to duration in dts
For strict CFR, they should be pretty much equal, but if the stream
is VFR, there can be a sometimes significant difference.

Calculate the pts duration separately, used in sidx atoms and for
tfrf/tfxd boxes in smooth streaming ismv files.

Also make sure to reduce the duration of sidx entries according to
edit lists.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-19 10:27:20 +02:00
Martin Storsjö
5c337353a2 movenc: Move sidx edit list timestamp adjustment into a block
When reading these values from track->frag_info, the same adjustment
has already been done.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-19 10:27:17 +02:00
Martin Storsjö
eee13d6539 movenc: Only adjust the cts offset at the start of fragments if necessary
Adjusting it is only necessary when a sidx/tfrf/tfxd atom already has
been written for the previous fragment (since the sidx/tfrf/tfxd atoms
include the duration between the first pts of the previous fragment, to
the first pts of the new fragment).

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-19 10:27:15 +02:00
Martin Storsjö
5cf892d694 movenc: Write pts timestamps in tfxd, instead of dts timestamps
This matches what we write in tfra and tfrf since 9cbf70fa0e.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-19 10:27:12 +02:00
Martin Storsjö
b81b0cc22b movenc: Set the last packet duration based on the next packet when autoflushing
When automatically flushing fragments based on set conditions
(fragmentation on keyframes, after some interval or byte size),
we already have the next packet for one stream - use this for setting
the duration of the last packet in the flushed fragment correctly.

This avoids having to adjust the timestamp of the first packet in
the new fragment since the last duration was unknown.

Unfortunately, this only works for automatic flushing (not for
caller-triggered flushing, like in the dash muxer), and only for the
one single track that triggered the flushing. The duration of the
last sample in all other tracks still is dependent on AVPacket
duration (or heuristics).

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-19 10:27:07 +02:00
Martin Storsjö
3041183677 dashenc: Heuristically fill in the duration of packets that need it
This avoids that the mp4 muxer does a similar heuristic, adjusting
the timestamps in a way that the dash muxer doesn't know the actual
timestamps written to the file in the end. By making sure that the
mp4 muxer internal heuristic isn't applied, we know the exact
timestamps written to file, so that the timestamps in manifest match
the files.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-19 10:27:03 +02:00
Martin Storsjö
2889c5e167 movenc: Heuristically set the duration of the last sample in a fragment if not set
Even if this is a guess, it is way better than writing a zero duration
of the last sample in a fragment (because if the duration is zero,
the first sample of the next fragment will have the same timestamp
as the last sample in the previous one).

Since we normally don't require libavformat muxer users to set
the duration field in AVPacket, we probably can't strictly require
it here either, so don't log this as a strict warning, only as info.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-19 10:26:52 +02:00
Martin Storsjö
8dc72eeaf6 udp: Fix crashes after adding AVOptions
Add a missing AVClass member, check whether localaddr is null.
(Previously, localaddr was always a local stack buffer, while it
now also can be an avoption string which can be null.)

This fixes crashes when not passing any localaddr parameter, since
66028b7ba.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-19 10:25:22 +02:00
Derek Buitenhuis
8692d74b73 mov: Add option to keep exact packet sequence after seeking
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.
2015-03-18 14:28:56 +00:00
Vittorio Giovara
423f5d50e4 mov: Fix little endian audio detection
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
2015-03-17 13:34:23 +00:00
Carl Eugen Hoyos
4326bc364b lavf: Do not list mov-only codecs in riff tags
Instead check for all mov code-points when demuxing avi
and print a warning if a video codec is found like this.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-03-17 13:34:22 +00:00
Paul B Mahol
cf9861dea5 isom: Add X-Com Radvision FourCC
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-03-17 13:34:22 +00:00
Vittorio Giovara
02d76141d6 riff: Add 'tshd' FourCC for H.264 2015-03-17 13:34:22 +00:00
Luca Barbato
96dd04427f isom: Add support for TSCC2
As produced by Camtasia 4.
2015-03-17 12:21:23 +01:00
Martin Storsjö
2cb9c2fc59 movenc: Allow interleaving samples when writing fragmented files
This is incompatible with the omit_tfhd_offset flag (writing
position independent fragments with interleaving requires the
default_base_moof flag).

This makes the moof atoms slightly bigger, but can be better for
playback (improving locality of sample data in the mdat).

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-16 13:23:19 +02:00
Martin Storsjö
50ff0c05b6 movenc: Support writing multiple trun atoms
This is needed if all the data for one track isn't continuous
within the mdat. Normally we make sure all the data for one
track is continuous, but in new cases we will need to have
the samples interleaved.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-03-16 13:23:19 +02:00
Luca Barbato
66a0ac0a80 mkv: Add support for DVB subtitles
Bug-Id: 833
2015-03-15 23:49:17 +01:00
Luca Barbato
66028b7ba6 udp: Use AVOptions
Add AVOptions for options currently available as url parameters.
2015-03-15 18:29:11 +01:00
Luca Barbato
a4c5801070 sctp: Update to match tcp
Use AVOption and fallback over multiple addresses
2015-03-15 18:29:11 +01:00
Vittorio Giovara
247e370e2a TDSC decoder
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-03-13 19:48:14 +00:00