Commit Graph

42564 Commits

Author SHA1 Message Date
Anton Khirnov
f6c94457b4 mpegvideo_enc: enable rtp_mode when multiple slices are used
Currently, multiple slices with just one thread produce corrupted
output.

Additionally, enable slice structured mode for h263(+)

Bug-Id: 912
CC: libav-stabl@libav.org
2015-11-20 09:22:59 +01:00
Anton Khirnov
d80f0a4ad6 mpevideo_enc: disallow multiple slices for h261 and flv
They do not work and produce corrupted output.

CC: libav-stable@libav.org
2015-11-20 09:22:48 +01:00
John Stebbins
ca489564ae movenc: add fallback audio track tref support
This feature allows making associations between audio tracks
that apple players recognize.  E.g. when an ac3 track has a
tref that points to an aac track, devices that don't support
ac3 will automatically fall back to the aac track.

Apple used to *guess* these associations, but new products
(AppleTV 4) no longer guess and this association can only
be made explicitly now using the "fall" tref.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-11-18 11:38:03 +01:00
John Stebbins
79ae1e630b avcodec: Define side data type for fallback track
This side data type is meant to be added to AVStream side data.
A fallback track indicates an alternate track to use when the
current track can not be decoded for some reason.  e.g. no
decoder available for codec.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-11-18 11:37:27 +01:00
John Stebbins
7f4ec4364b avformat: expose av_stream_new_side_data helper
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-11-18 11:36:27 +01:00
Anton Khirnov
21ab6fd01b lavf: document that passing valid timestamps to muxers is now mandatory
Also, extend the documentation about setting timestamps.
2015-11-18 11:31:40 +01:00
Luca Barbato
5c30ae1a09 dvdsubdec: Validate the RLE offsets
CC: libav-stable@libav.org
2015-11-17 18:56:29 +01:00
Vittorio Giovara
eda1832874 travis: Enable OSX integration 2015-11-17 16:51:00 +01:00
Vittorio Giovara
79d89cf2f4 flacenc: Clamp user-supplied min/max prediction orders
This mimics what the code does internally for default order values.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-11-16 16:56:42 +01:00
Vittorio Giovara
4bb1070c15 ffv1: Explicitly name the coder type
FFv1 uses two types of coders, golomb and range with two different
tables. This is exposed this in a rather convoluted way, for example
mentioning to set coder type 1 while initializing the variable 'ac' to 2,
because encoder does not use range coder with default table.

Appropriate internal coder type values have been added and used in any
check rather than using raw numbers.

Initialization of avctx.coder_type in ffv1dec is removed because this
field is encoder only. An unneeded validation check in the encoder
is dropped too.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-11-16 12:56:31 +01:00
Andreas Cadhalpun
9fd2bf09db hqx: correct type and size check of info_offset
It is used as size argument of ff_canopus_parse_info_tag, which uses it
as size argument to bytestream2_init, which only supports sizes up to
INT_MAX.
Changing it's type to unsigned simplifies the check.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-11-16 12:56:03 +01:00
Andreas Cadhalpun
0a8bff788b dds: disable palette flag for compressed images
Having both is not valid and can cause a NULL pointer dereference of
frame->data[1] later.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-11-14 03:40:20 +01:00
Michael Niedermayer
2fb6e1e754 segafilm: Fix current_sample after seeking and avio_seek return type
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-14 03:39:44 +01:00
Martin Storsjö
62b4a6f1b9 rtmpcrypt: Provide the xtea keys in little endian format for consistency
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-11-13 21:54:04 +02:00
Martin Storsjö
588b6215b4 rtmpcrypt: Do the xtea decryption in little endian mode
The XTEA algorithm operates on 32 bit numbers, not on byte sequences.
The XTEA implementation in libavutil is written assuming big endian
numbers, while the rtmpe signature encryption assumes little endian.

This fixes rtmpe communication with rtmpe servers that use signature
type 8 (XTEA), e.g. crunchyroll.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-11-13 21:53:57 +02:00
Martin Storsjö
92d107a171 xtea: Add functions for little endian mode
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-11-13 21:53:54 +02:00
Martin Storsjö
1fc94724f1 xtea: Clarify that the current API works in big endian mode
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-11-13 21:53:51 +02:00
Andreas Cadhalpun
7b2211bfc4 dds: add missing newline to log messages
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-11-12 04:39:14 +01:00
Andreas Cadhalpun
29b1752861 dds: validate compressed source buffer size
A too small buffer will cause segfaults somewhere below
decompress_texture_thread.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-11-12 04:39:14 +01:00
Andreas Cadhalpun
e6459c655e dds: validate source buffer size before copying
If it is too small av_image_copy_plane segfaults.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-11-12 04:39:14 +01:00
Vittorio Giovara
b5f963bfec mov: Drop dref when unable to parse
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.
2015-11-12 04:39:14 +01:00
Vittorio Giovara
303f931938 mov: Correctly store dref paths
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.
2015-11-12 04:39:14 +01:00
Vittorio Giovara
e25cac50e0 lavc: Add missing mem.h header to libxvid and screenpresso 2015-11-12 04:39:14 +01:00
Carl Eugen Hoyos
73b0324913 aiff: Support demuxing G.722 streams 2015-11-12 04:39:14 +01:00
Paul B Mahol
5f2c8315b3 thp: set duration for audio stream too
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-11-12 04:39:14 +01:00
Martin Storsjö
1d62ee3889 movenc: Add a unit test for signaling of the track start times
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-11-11 22:53:42 +02:00
Martin Storsjö
bef3b1f59f movenc: Allow setting start_dts/start_cts before writing actual packets
By writing a zero-sized packet, the caller can communicate the
start_dts/start_cts for the stream without actually writing
the first packet.

This allows doing random-access writing of fragments when the
start dts of the stream isn't zero, so that the edit list in the moov
is written based on timestamps from the nominal start time signaled
via the zero-sized packet, while the first proper packet written
corresponds to a later fragment.

To avoid potential unexpected behaviour, empty packets only set
start_dts if the frag_discont flag is set.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-11-11 22:53:31 +02:00
Martin Storsjö
3eeb7edfc2 movenc: Add a unit test for frag_discont with edit lists
This tests the case where the muxer correctly guesses that a stream
starts at pts=0.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-11-11 22:52:53 +02:00
Martin Storsjö
09e431b9e3 movenc: Assume streams starting at pts=0 for discontinuous fragments with editlists
This allows producing fragments discontinously where the video
stream has b-frames (but starts at pts=0), but doesn't work for the
cases with audio with preroll.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-11-11 22:52:36 +02:00
Martin Storsjö
59e8ec0aa8 movenc: Add an API unit test for fragmenting options/calls
Contrary to the normal fate tests that run via avconv, this tests
nontrivial call sequences that are only doable via the API
(mainly for different corner cases when using the muxer for
segmenting).

The test muxes fake packet data (with extradata that looks
enough like proper data to make the file be viewable with e.g.
boxdumper) and checks the hash of the produced files. The test also
verifies that fragments produced via different call sequences remain
identical (to avoid e.g. updating the output hashes and suddenly
having fragments that used to be identical suddenly diverging), for
fragments written with frag_discont and/or delay_moov.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-11-10 21:50:25 +02:00
Martin Storsjö
8ad5124b7e movenc: Automatically flush after writing the initial moov
In most other cases when writing fragmented mp4 files, the output
IO context is flushed after each fragment. Also flush it after
writing the initial moov, to have it behave in the same way.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-11-10 21:46:03 +02:00
John Stebbins
db9b7321d5 vsrc_color: implement frame rate
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-11-09 08:15:26 +01:00
Michael Niedermayer
1339009c49 vf_showinfo: show timebase & framerate too
(cherry picked from ffmpeg commit fdb9399681)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-11-09 08:15:23 +01:00
Michael Niedermayer
11f87ca71e vf_frei0r: also set AVFilterLink.frame_rate
(cherry picked from ffmpeg commit 353cf95f94)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-11-09 08:09:42 +01:00
Michael Niedermayer
7d12cba95c vf_framepack: Check and update frame_rate
(cherry picked from ffmpeg commit a46a23d30f)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-11-09 08:09:41 +01:00
Michael Niedermayer
65e73bc60f vf_interlace: implement frame rate
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from ffmpeg commit 227b4458fb)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-11-09 08:09:41 +01:00
Stefano Sabatini
018bdaed37 setpts: add FRAME_RATE constant
Useful for dealing with constant frame-rate video.

(cherry picked from ffmpeg commit 722762f7e1)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-11-09 08:09:41 +01:00
Stefano Sabatini
5e91a5c5cf testsrc: set output framerate
(cherry picked from ffmpeg commit 7cd5fa35fe)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-11-09 08:09:41 +01:00
Michael Niedermayer
9df477e03e yadif: update frame rate
(cherry picked from ffmpeg commit 3161958455)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-11-09 08:09:41 +01:00
Nicolas George
1062880d69 vf_fps: set frame_rate.
(cherry picked from ffmpeg commit 0d24931604)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-11-09 08:09:41 +01:00
Nicolas George
61fb67dcb2 buffersrc: accept the frame rate as argument.
(cherry picked from ffmpeg commit 9ca440679d)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-11-09 08:09:41 +01:00
Nicolas George
48ff6683ba lavfi: add a frame_rate field to AVFilterLink.
(cherry picked from ffmpeg commit 7b42036b3b)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2015-11-09 08:09:34 +01:00
Anton Khirnov
79f5347a98 avcodec: fix doxy placement 2015-11-09 07:52:20 +01:00
Anton Khirnov
8de1ee9f72 lavf: deprecate compute_pkt_fields2
All encoders set pts and dts properly now (and have been doing that for
a while), so there is no good reason to do any timestamp guessing in the
muxer.

The newly added AVStreamInternal will be later used for storing all the
private fields currently living in AVStream.
2015-11-09 07:50:55 +01:00
Anton Khirnov
aeda1121c9 lavf: factor out freeing an AVStream
It will be needed in other functions.
2015-11-08 11:49:23 +01:00
Anton Khirnov
3efd71b4d0 avconv: set packet duration for CFR video streams 2015-11-08 11:49:05 +01:00
Anton Khirnov
a0c71a5751 lavf: initialize cur_dts to AV_NOPTS_VALUE for muxing
The reasoning for setting it to zero only applies to demuxing.
2015-11-08 11:48:47 +01:00
Michael Niedermayer
cc96018c79 libopenh264enc: Set AVOption data type
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-11-06 21:55:15 +01:00
Michael Niedermayer
fcc49924db vdpau: Remove a spurious CONFIG_H263_VDPAU_HWACCEL
Fixes libavcodec/vdpau.c:282:5: warning:
    "CONFIG_H263_VDPAU_HWACCEL" is not defined [-Wundef]

Removed in d35d0c723e.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-06 21:55:15 +01:00
Michael Niedermayer
563e6d8603 segafilm: drop the "song and dance" for cinepak
This seems not to do anything any more since a long time, and removing
it avoids using uninitialized memory. Also change the error value
forwarding as done everywhere else.

Partly fixes: msan_uninit-mem_7fb7d24780d0_2744_R03T.CAK
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-11-06 21:55:15 +01:00