Commit Graph

10874 Commits

Author SHA1 Message Date
Stephen Hutchinson 3cc3463f30 avisynth: Support pix_fmts added to AviSynth+
A number of new pix_fmts* have been added to AviSynth+:
16-bit packed RGB and RGBA
10-, 12-, 14, and 16-bit YUV 4:2:0, 4:2:2, and 4:4:4
8-, 10-, 12-, 14-, and 16-bit Planar RGB
8-, 10-, 12-, 14-, and 16-bit Planar YUVA and Planar RGBA
10-, 12-, 14-, and 16-bit GRAY variants
32-bit floating point Planar YUV(A), Planar RGB(A), and GRAY

*some of which are not currently available pix_fmts here and were
 not added to the demuxer due to this

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-11-17 09:44:12 +01:00
Stephen Hutchinson aaae59700f avisynth: Simplify the pix_fmt check for the newer AviSynth API
The values don't need to be hardcoded since the correct values are
returned by avs_bits_per_pixel.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-11-17 09:21:24 +01:00
Marton Balint bcefafa226 avisynth: Fix setting stream timebase
Stream timebase should be set using avpriv_set_pts_info, otherwise
avctx->pkt_timebase is not correct, leading to A/V desync.

Signed-off-by: Marton Balint <cus@passwd.hu>
Reviewed-by: Stephen Hutchinson <qyot27@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-11-17 09:21:23 +01:00
Vittorio Giovara d5d62ce6d6 mov: Fix identity matrix boolean logic
This prevented the code from correctly exporting the rotation matrix
which caused a few samples to be displayed wrong.
Introduced in ecd2ec69ce.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-11-16 11:17:06 -05:00
Diego Biurrun 800d91d348 Drop pointless void* casts 2016-11-13 18:44:01 +01:00
Diego Biurrun fcbdd605b5 nut: Use correct function pointer casts instead of void*
Fixes several warnings of the type
libavformat/nut.c:207:42: warning: ISO C forbids conversion of function pointer to object pointer type [-Wpedantic]
2016-11-12 16:47:06 +01:00
James Almer 98cae966c7 matroskaenc: write updated STREAMINFO metadata for FLAC streams if available
FLAC streams originating from the FLAC encoder send updated and more
complete STREAMINFO metadata as part of the last packet, so write that
to CodecPrivate instead of the incomplete one available in extradata
during init.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-11-10 09:15:24 +01:00
James Almer f4bf236338 matroskaenc: fix muxing AAC streams when using aac_adtstoasc bsf
aac_adtstoasc makes the aac extradata available only after the first packet
is filtered, and as packet side data.

Assume extradata will be available as part of the first packet if
avpriv_mpeg4audio_get_config() fails the first time due to missing extradata
and reserve space for the OutputSampleRate element in the Tracks master.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-11-10 09:01:18 +01:00
Diego Biurrun 67deba8a41 Use avpriv_report_missing_feature() where appropriate 2016-11-08 17:54:34 +01:00
Vittorio Giovara de6e2ff3dd mov: Read multiple stsd from DV
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-11-08 11:22:29 -05:00
Vittorio Giovara 47a795727f hevc: Support extradata changes from multiple stsd
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-11-08 11:22:29 -05:00
Diego Biurrun 67351924fa Drop unreachable break and return statements 2016-11-03 20:17:12 +01:00
Diego Biurrun f4ca8ea92a rtmpproto: Restructure zlib code to avoid unreachable code warning
libavformat\rtmpproto.c(1165) : warning C4702: unreachable code
2016-11-02 10:33:39 +01:00
Vittorio Giovara ecd2ec69ce mov: Evaluate the movie display matrix
This matrix needs to be applied after all others have (currently only
display matrix from trak), but cannot be handled in movie box, since
streams are not allocated yet. So store it in main context, and apply
it when appropriate, that is after parsing the tkhd one.

Fate tests are updated accordingly.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-11-01 12:19:00 -04:00
Mark Thompson 218ed7250c openssl: Allow newer TLS versions than TLSv1
The use of TLSv1_*_method() disallows newer protocol versions; instead
use SSLv23_*_method() and then explicitly disable the deprecated
protocol versions which should not be supported.
2016-10-31 19:34:42 +00:00
Luca Barbato c541a44e02 Revert "rtmpproto: Don't include a client version in the unencrypted C1 handshake"
This reverts commit 7d8d726be7.
2016-10-30 21:55:03 +01:00
Diego Biurrun 07cac07c0c dash: Use correct ISO C scanf conversion specifier 2016-10-28 13:29:52 +02:00
Diego Biurrun 3ec6f855d0 srt: Adjust signedness of sscanf format strings
Fixes several warnings from -Wformat.
2016-10-28 13:28:36 +02:00
Diego Biurrun c454dfcff9 Use ISO C printf conversion specifiers where appropriate 2016-10-28 13:24:44 +02:00
Diego Biurrun 1263b2039e Adjust printf conversion specifiers to match variable signedness 2016-10-28 11:22:21 +02:00
Diego Biurrun ca1e5eea0c Remove some pointless TRACE level debug code
This also kills some warnings with certain compiler options.
2016-10-27 12:54:14 +02:00
Diego Biurrun 07eea5a5de nut: Drop pointless TRACE level debug code
The code has little usefulness and uses the __PRETTY_FUNCTION__ GNU extension.
2016-10-27 12:54:07 +02:00
Diego Biurrun c3dad1bf3b nsv: Drop unnecessary TRACE level debug code
The output is rather silly and the code uses non-standard __FUNCTION__.
2016-10-27 12:21:46 +02:00
Martin Storsjö f22363c729 openssl: Avoid double semicolons after the GET_BIO_DATA macro
When the macro is expanded with a semicolon following it and the
macro itself contains a semicolon, we ended up in double semicolons,
which is treated as a statement that disallows further declarations.

This avoids errors about mixed declarations and statements on gcc,
after ee05079766.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-10-25 21:48:35 +03:00
Matt Oliver ee05079766 openssl: Support version 1.1.0.
Further simplifications by Martin Storsjö, to minimize the
diff.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-10-23 22:02:08 +03:00
Martin Storsjö 016387fe0f rtmpdh: Don't use the OpenSSL DH struct
Instead use our own struct, which we already use when using
gcrypt and gnutls.

In OpenSSL 1.1, the DH struct has been made opaque.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-10-23 22:02:01 +03:00
Vittorio Giovara 4b07ebf1eb mov: Update colr values
For 'nclx', the latest edition of the standard switched from JPEG XR
to 23001-8, which matches the current order of our entries. Bounds
are preserved as a sanity check.

For 'nclc', qtff edition 2016-09-13 introduced a few new entries.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-10-21 17:15:04 -04:00
Anton Khirnov 096a8effa3 lavf: check that the codec is supported by extract_extradata
Avoids superfluous error message spam after
8e2ea69135
2016-10-21 10:11:20 +02:00
Anton Khirnov 8e2ea69135 lavf: use the new bitstream filter for extracting extradata
This also fixes a minor bug introduced in the codecpar conversion, where
the termination condition for extracting the extradata does not match
the actual extradata setting code. As a result, the packet durations
made up by lavf go back to their values before the codecpar conversion.
That is of little consequence since that code should eventually be
dropped completely.
2016-10-16 20:27:30 +02:00
Anton Khirnov c359d624d3 hevcdec: move decoder-independent declarations into a separate header
This way they can be reused by other code without including the whole
decoder-specific hevcdec.h
Also, add the HEVC_ prefix to them, since similarly named values exist
for H.264 as well and are sometimes used in the same code.
2016-10-16 20:26:28 +02:00
Anton Khirnov 4abe3b049d hevc: rename hevc.[ch] to hevcdec.[ch]
This is more consistent with the rest of libav and frees up the hevc.h
name for decoder-independent shared declarations.
2016-10-16 20:26:17 +02:00
James Almer 6c31ba2269 avformat/matroska: fix MatroskaVideoFieldOrder enum values
The spec says

9: Interlaced with bottom field displayed first and top field stored first
14: Interlaced with top field displayed first and bottom field stored first

And avcodec.h states

AV_FIELD_TB,          //< Top coded first, bottom displayed first
AV_FIELD_BT,          //< Bottom coded first, top displayed first

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-10-16 19:02:53 +02:00
Anton Khirnov 20b75970e4 file protocol: handle the file: protocol string in file_check
This is consistent with what file_open() does.

CC: libav-stable@libav.org
2016-10-16 18:47:25 +02:00
Martin Storsjö 7d8d726be7 rtmpproto: Don't include a client version in the unencrypted C1 handshake
According to the public RTMP specification, these 4 bytes should
be zero.

librtmp in server mode assumes that the RTMPE (FP9) handshake is
used if these bytes are nonzero.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-10-14 23:11:19 +03:00
Martin Storsjö 9f23f77a53 rtmpproto: Don't include the libavformat version as "clientid"
When acting as server, the server can include a "clientid" property
in some status messages. But this should be a unique number
identifying the client session, not identifying the server itself.
In practice, omitting it works just as well as including this
incorrect field.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-10-14 23:11:17 +03:00
Martin Storsjö 8b5e0d17e7 rtmpproto: Send chunk size on the network channel
This makes sure that e.g. Adobe FME actually reacts to it. As long
as the value we've been sending is the default one (128), the bug
hasn't been noticed.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-10-14 23:11:15 +03:00
Martin Storsjö d6ded94036 rtmpproto: Lengthen the filename buffer when receiving streams
Some applications such as Adobe FME append lots of parameters
here, making it easily overflow the current limit.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-10-14 23:11:12 +03:00
Martin Storsjö 7395784ba7 rtmpproto: Check the return from ff_amf_read_string
If this failed, we used to continue with an uninitialized
filename buffer.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-10-14 23:11:08 +03:00
Vittorio Giovara 497c087939 avidec: Set palette alpha as fully opaque
Palette format is always in RGBA.
2016-10-02 15:42:03 -04:00
Vittorio Giovara bad4aad403 avidec: Do not special case palette on big-endian
This simplifies the code a bit, does not change output data in any way.
2016-10-02 15:42:03 -04:00
Anton Khirnov 8ea35af762 avio: add a new flag for marking streams seekable by timestamp 2016-09-30 16:55:45 +02:00
Anton Khirnov 75c1db6152 avio: cosmetics, prettify AVIO_SEEKABLE_NORMAL
Move the doxy above the definition, change the value itself to the
(1 << n) pattern, which is more readable for flags.
2016-09-30 16:54:55 +02:00
Anton Khirnov 83548fe894 lavf: fix usage of AVIOContext.seekable
It is supposed to be a flag. The only currently defined value is
AVIO_SEEKABLE_NORMAL, but other ones may be added in the future.
However all the current lavf code treats this field as a bool (mainly
for historical reasons).
Change all those cases to properly check for AVIO_SEEKABLE_NORMAL.
2016-09-30 16:54:33 +02:00
Martin Storsjö df37950253 rtsp: Fix a crash with the RTSP muxer
This was introduced in bc2a32969e.

The whole block that the statement was added to is only
relevant when used as a demuxer, but the other statements
there have had other if statements guarding them. Make
sure to only run this whole block if being used as a
demuxer.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-09-15 16:07:45 +03:00
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