1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Commit Graph

10489 Commits

Author SHA1 Message Date
Andreas Cadhalpun
f261a55d72 mov: Fix two memleaks
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>

CC: libav-stable@libav.org
2015-05-31 13:05:12 +02:00
wm4
881b80b329 network: prevent SIGPIPE on OSX
OSX does not know MSG_NOSIGNAL. BSD (which OSX is based on) has got
the socket option SO_NOSIGPIPE (even if modern BSDs also support
MSG_NOSIGNAL).

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-31 10:10:16 +03:00
Martin Storsjö
b2f0f37d24 rtmpdh: Generate the whole private exponent using av_get_random_seed() with nettle/gmp
Don't use a PRNG for generating it; that defies the intended use
within the cryptograhic handshake.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-29 23:33:03 +03:00
Martin Storsjö
e9e86d9ef6 rtmpdh: Create sufficiently long private keys for gcrypt/nettle
There was a misunderstanding betewen bits and bytes for the parameter
value for generating random big numbers.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-29 09:42:41 +03:00
Martin Storsjö
8016a1bd3b rtmpdh: Remove an unnecessary check in the gcrypt/nettle dh_compute_key
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-29 09:42:38 +03:00
Martin Storsjö
063f7467e4 rtmpdh: Add fate test for the DH handshake routine
This helps if these functions need to be implemented using another
crypto API.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-29 09:42:35 +03:00
Martin Storsjö
0508faaa11 rtmpdh: Pass the actual buffer size of the output secret key
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-29 09:42:32 +03:00
Martin Storsjö
9f1b3050d9 rtmpdh: Check the output buffer size in the openssl version of dh_compute_key
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-29 09:42:30 +03:00
Martin Storsjö
127d813bcb rtmpdh: Fix a local variable name in the nettle/gcrypt codepath
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-29 09:42:28 +03:00
Martin Storsjö
78efc69e7c rtmpdh: Make sure ret is initialized in the nettle version of bn_hex2bn
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-29 09:42:24 +03:00
Martin Storsjö
d4d90504a6 tls_gnutls: Add missing includes for the gcrypt thread safety callbacks
This fixes building with gcrypt-backed gnutls versions, broken
in 57cde2b180.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-28 15:05:52 +03:00
wm4
57cde2b180 lavf: move TLS-related ifdeffery to library specific files
There is no need to have this mess in network.c.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-26 21:48:51 +03:00
wm4
d8ffb2055f lavf: split tls.c
Move the OpenSSL and GnuTLS implementations to their own files. Other
than the connection code (including options) and some boilerplate, no
code is actually shared.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-26 21:48:32 +03:00
James Almer
29216d7fd1 tls: fix compilation when both gnutls and openssl are enabled
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-22 12:21:38 +03:00
Martin Storsjö
94599a6de3 tls: Remove all the local polling loops
These aren't necessary any longer.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-22 00:06:11 +03:00
Martin Storsjö
d13b124eaf tls: Remove the nonblocking code
Since the underlying URLContext read functions are used,
they handle interruption, without having to handle it at
this level.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-22 00:05:01 +03:00
Martin Storsjö
d15eec4d6b tls: Use custom IO to read from the URLContext
This avoids hijacking the fd, by reading using the normal
URLContext functions instead. This allowing reading data that has
been buffered in the underlying URLContext.

This avoids using the libraries own send functions that can
cause SIGPIPE.

The fd is still used for polling the lowlevel socket, for
waiting for retries.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-22 00:04:32 +03:00
Vittorio Giovara
8fc11abe1f mkv: Print unsupported mov tags when found 2015-05-12 15:28:31 +01:00
Carl Eugen Hoyos
da5c6a97bb riff: Add MultiScope II fourcc MSC2 as MJPEG
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-12 03:22:18 +02:00
Martin Storsjö
b8d2630c53 dashenc: Reduce the segment duration if cutting out parts with edit lists
This makes sure that the time + duration of the first segment
matches the start time of the next segment for e.g. AAC audio
with encoder delay.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-10 22:57:21 +03:00
James Almer
ac1a1cb948 dashenc: replace attribute id with contentType for the AdaptationSet element
id should be an integer, not a string. It is also optional, so use
contentType instead which is the proper attribute for these values.

This fixes an MPD validation error.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-05-10 22:57:20 +03:00
wm4
379e5603f4 id3v2: Do not export empty APIC description
APIC tags always have a description. Tag writers obviously leave it
empty if there is no description. In this case, libavformat would export
"" as title. Do not set the title instead.
2015-05-09 15:55:50 +02:00
Luca Barbato
254f3daba4 nut: Make sure to clean up on read_header failure
Based on Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> work.

CC: libav-stable@libav.org
2015-05-09 15:55:50 +02:00
Andreas Cadhalpun
4d0ee4962b avi: Validate sample_size
And either error out or set it to 0 if it is negative.

CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-09 15:51:31 +02:00
Andreas Cadhalpun
b34257eefd nut: Check chapter creation in decode_info_header
This fixes a segmentation fault when accessing the metadata.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>

CC: libav-stable@libav.org
2015-05-08 11:10:51 +02:00
Michael Niedermayer
e0010bb91f mux: Do not leave stale side data pointers in ff_interleave_add_packet()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-05-06 15:01:35 +01:00
Vittorio Giovara
6c8c7c2462 dump: Print AVAudioServiceType side data 2015-05-06 14:57:46 +01:00
Vittorio Giovara
7b734ee55d lavf: Open PICT images with Quickdraw
Update the pictor test to use the pictor codec, as both formats share
the .pic file extension.
2015-05-06 14:27:34 +01:00
John Högberg
82de8d7111 mpegts: Update the PSI/SI table only if the version change
If a PAT is finished while a PMT section filter is opened but
not yet finished, the PMT section filter is closed and all
the received data is discarded.

This is usually not an issue but some multiplexers (With very
quick PAT/PMT repetition settings) consistently emit a PMT
section start, then a PAT, and then the rest of the PMT,
causing the aforementioned behavior to result in no PMT being
finished.

In the most pathologic situation the stream information are lost
and the probe fallback miscategorizes subtitles as mp3 audio.

Avoid the issue through eliminating redundant PSI/SI table
updates by checking their version field, which is required by
the standard to be incremented on every change no matter how
minor.

CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-04-28 21:09:59 +02:00
Vittorio Giovara
b17cbb0b1c riff: Add GMP4 fourcc for mpeg4 2015-04-24 14:55:10 +01:00
Vittorio Giovara
3c04ec04df riff: Add GLV4 fourcc for mpeg4 2015-04-24 14:55:10 +01:00
Martin Storsjö
b90adb0aba rtsp: Make sure we don't write too many transport entries into a fixed-size array
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-04-24 16:07:14 +03:00
Andrey Utkin
1bd2646a6d rtpenc_jpeg: Handle case of picture dimensions not dividing by 8
This fixes the calculation of the number of needed blocks to make
sure that ALL pixels are represented by the result.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-04-23 23:20:03 +03:00
Martin Storsjö
eb7ddb5066 rtsp: Don't warn about unparsed time ranges
This removes the error logging added in 4e54432164.

This avoids warnings about "Invalid interval start specification 'now'"
for live rtsp streams.

We only try to parse some of the many valid values for time ranges
in RTSP - the other ones are fully valid but not interesting for the
use case in rtsp.c, so we shouldn't warn about them.

(Parsing the time ranges is needed to allow seeking, but e.g. setting
the current realtime clock for the start time doesn't make sense.
av_parse_time has got a different mode for parsing absolute times
as well, which can handle the special case "now", but that doesn't
make much sense for this particular use in rtsp.c.)

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-04-23 23:20:02 +03:00
Vittorio Giovara
98cab39798 lavf: Fix variables constness in ff_iso8601_to_unix_time()
warning: assigning to
      'char *' from 'const char *' discards qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
2015-04-20 18:43:33 +01:00
Luca Barbato
d34039b171 rmenc: Drop the temporary buffer for ac3 byteswap
Use direcly avio_w8().

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-04-20 12:41:33 +02:00
Luca Barbato
656e31ed87 ogg: Forward errors further
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-04-20 12:41:33 +02:00
Martin Storsjö
2cc3936599 dashenc: Add a publishTime field in dynamic manifests
This field is mandatory in dynamic manifests.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-04-20 13:16:45 +03:00
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