1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

10858 Commits

Author SHA1 Message Date
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
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