Commit Graph

10516 Commits

Author SHA1 Message Date
Paul B Mahol
5a79bf0284 PCM signed 16-bit big-endian planar decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-06-24 14:45:00 +01:00
Vittorio Giovara
5c018ee188 DirectDraw Surface image decoder
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-06-22 15:23:08 +01:00
Vittorio Giovara
7ca3e5203f Hap decoder and encoder
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-06-22 15:23:08 +01:00
Luca Barbato
61dc9d647c udp: Fix local_port management
The default value for unset is -1, not 0.

Problem introduced in 66028b7ba6
2015-06-22 10:47:29 +03:00
nu774
6ec688e1bc mp3: enable packed main_data decoding in MP4
14496-3 suggests packing main_data of MP3 that is usually scattered
into multiple frames due to bit reservoir.

However, after packing main_data into a access unit, bitrate index
in the MPEG audio frame header doesn't match with actual frame size.

In order to accept this, this patch removes unnecessary frame size
checking on mp3 decoder.

Also, mov demuxer was changed to use MP3 parser only on special cases
(QT MOV with specific sample description) to avoid re-packetizing.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-06-20 12:18:01 +03:00
Luca Barbato
24ad3ac6a3 nut: Drop doxygen markers 2015-06-15 13:39:07 +02:00
Vittorio Giovara
07b2db81d0 riff: Add MNM4 FourCC as mpeg4 2015-06-15 12:29:25 +01:00
wm4
74ea1167d9 tls_gnutls: fix hang on disconnection
GNUTLS_SHUT_RDWR means GnuTLS will keep waiting for the server's
termination reply. But since we don't shutdown the TCP connection at
this point yet, GnuTLS will just keep skipping actual data from the
server, which basically is perceived as hang.

Use GNUTLS_SHUT_WR instead, which doesn't have this problem.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-06-14 19:50:03 +03:00
Vittorio Giovara
a7ac1a7b94 flv: Name an enum and use its type 2015-06-12 17:02:49 +01:00
Vittorio Giovara
8a78ae2d21 segment: Check open_null_ctx() return value
Reported-By: infer
2015-06-12 17:02:48 +01:00
Janne Grunau
529c05698e movenc: fixes a questionable valgrind uninitialized value warning
display_matrix_size is only initialized when av_stream_get_side_data()
returns a side data pointer. The code is safe since the only effect this
has is setting the display_matrix pointer to NULL which it was already
anyway.
2015-06-10 14:32:11 +02:00
Luca Barbato
b14086ca38 mkv: Correctly report the latest packet had been flushed
Bug-Id: 865
CC: libav-stable@libav.org
2015-06-09 14:27:54 +02:00
James Almer
b380337020 mpjpegdec: don't try to alloc an AVIOContext when probe is guaranteed to fail
The first check is done without the AVIOContext, so alloc it only if said check succeeds

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2015-06-09 10:07:11 +02:00
Vittorio Giovara
4733a12dd1 rtpdec_asf: Check memory allocation and free memory on error
CC: libav-stable@libav.org
Bug-Id: CID 1257774
2015-06-08 13:04:29 +01:00
Vittorio Giovara
6308cd4868 mov: Check memory allocation
CC: libav-stable@libav.org
Bug-Id: CID 1292518
2015-06-08 13:03:39 +01:00
Vittorio Giovara
f7e9324733 audiointerleave: Always initialize new_pkt
CC: libav-stable@libav.org
Bug-Id: CID 609333
2015-06-08 13:03:10 +01:00
Vittorio Giovara
8ef98855d2 sctp: Always initialize outmsg struct
CC: libav-stable@libav.org
Bug-Id: CID 1302711
2015-06-08 13:01:33 +01:00
Janne Grunau
caf7be30b1 mpjpgdec: free AVIOContext leak on early probe fail 2015-06-08 13:55:26 +02:00
Luca Barbato
252d6200c3 avio: Add avio_put_str16be 2015-06-07 10:14:45 +02:00
Luca Barbato
9b56ac74b1 mpjpeg: Initial implementation
Support only streams with Content-Length.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-06-07 10:14:45 +02:00
Martin Storsjö
63ce9fd23c rtmpdh: Use GMP functions directly, instead of nettle wrappers
mpz_import and mpz_export were added in GMP 4.1, in 2002.

This simplifies the DH code by clarifying that it only uses pure
bignum functions, no other parts of nettle/hogweed.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-06-01 10:38:54 +03:00
Martin Storsjö
84c5ff911f rtmpdh: Fix the indentation in a struct
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-06-01 10:38:54 +03:00
Andreas Cadhalpun
5c720657c2 mov: always check avio_read return value
If avio_read fails, the buffer can contain uninitialized data.

This fixes 'Conditional jump or move depends on uninitialised value(s)'
valgrind warnings, and addresses a few memleaks.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-31 13:05:13 +02:00
Vittorio Giovara
bff0349d9d avio: Add avio_read wrapper to simplify error checking
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-31 13:05:13 +02:00
Andreas Cadhalpun
cffb9ea81b mov: reject zero bytes_per_frame with non-zero samples_per_frame
In this case the mov demuxer can return a large number of empty packets.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-31 13:05:12 +02:00
Andreas Cadhalpun
8e9c39e81f mov: abort on EOF in ff_mov_read_chan
Otherwise the loop can take a lot of time if num_descr is very large.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-05-31 13:05:12 +02:00
Luca Barbato
a8a90906fb mov: Correctly allocate ctts_data
It can be reallocated.

CC: libav-stable@libav.org
2015-05-31 13:05:12 +02:00
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