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

17671 Commits

Author SHA1 Message Date
Rodger Combs
6c56827e62 lavf/brstm: move bfstm var to a local 2015-06-21 10:32:12 +00:00
Michael Niedermayer
6c8a05268c avformat/rawenc: Store sample number for ADX
Fixes Ticket4540

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-21 12:16:24 +02:00
Paul B Mahol
95ee0fbacf Support demuxing 4gv codec stored in qcp files
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-06-21 09:30:01 +00:00
Michael Niedermayer
f98c3ec5c6 avformat/movenc: Check return code of ff_iso8601_to_unix_time()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-21 04:18:08 +02:00
Rodger Combs
db426031dd lavf/brstm: allow larger block sizes
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-20 19:21:08 +02:00
Rodger Combs
d4c9eced98 lavf/brstm: support little-endian files (BCSTM; 3DS)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-20 16:50:47 +02:00
wm4
f6c3f1ed60 avformat: clarify what package needs to be compiled with SSL support
Try to reduce user confusion.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-18 22:26:36 +02:00
wm4
d4007d1763 id3v2: strip trailing spaces from APIC tag
The APIC description must be unique, and some ID3v2 tag writers add
spaces to write several APIC entries with the same description. The
trailing spaces simply serve as a way to disambiguate the description.
Do this so that API users do not have to special-case mp3 to fix this
cosmetic issue.

Requested-by: wm4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-18 19:15:49 +02:00
Michael Niedermayer
622f1468c9 avformat/id3v2: detect PNG by header instead of mime
the mimetype for PNG can be set to jpeg

Fixes 01\ -\ Cider\ Time.mp3

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-18 18:38:53 +02:00
Rodger Combs
bb42a7d4d4 lavf/brstm: add support for BFSTM files
Previous version reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-17 13:24:11 +02:00
wm4
dc87758775 avio: fix potential crashes when combining ffio_ensure_seekback + crc
Calling ffio_ensure_seekback() if ffio_init_checksum() has been called
on the same context can lead to out of bounds memory accesses and
crashes. The reason is that ffio_ensure_seekback() does not update
checksum_ptr after reallocating the buffer, resulting in a dangling
pointer.

This effectively fixes potential crashes when opening mp3 files.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-17 01:13:19 +02:00
Andreas Cadhalpun
28efeb6502 doc: avoid incorrect phrase 'allows to'
Also fix typo found by Lou Logan:
Sacrifying -> Sacrificing

Reviewed-by: Lou Logan <lou@lrcd.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-06-16 21:48:51 +02:00
Andreas Cadhalpun
92e79a2f7b matroskadec: validate audio channels and bitdepth
In the TTA extradata re-construction the values are written with
avio_wl16 and if they don't fit into uint16_t, this triggers an
av_assert2 in avio_w8.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-06-16 21:46:04 +02:00
Andreas Cadhalpun
5b76c82fd7 matroskadec: check audio sample rate
And default to 8000 if it is invalid.

An invalid sample rate can trigger av_assert2 in av_rescale_rnd.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-06-16 21:45:45 +02:00
Christian Suloway
7e871d6999 avformat/hlsenc: removed empty/unused print_encryption_tag function
Signed-off-by: Christian Suloway <csuloway@globaleagleent.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-16 16:52:38 +02:00
Michael Niedermayer
cf11fd632e avformat/mxfdec: Change version byte for JPEG2000 to match mxf.c and RP224v12
This should make no difference as the byte is ignored

Found-by: tim nicholson <nichot20@yahoo.com>
Reviewed-by: tim nicholson <nichot20@yahoo.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-16 13:28:44 +02:00
Christian Suloway
907ac20aa2 avformat/hlsenc: added HLS encryption
Added HLS encryption with -hls_key_info_file <key_info_file> option. The
first line of key_info_file specifies the key URI written to the
playlist. The key URL is used to access the encryption key during
playback. The second line specifies the path to the key file used to
obtain the key during the encryption process. The key file is read as a
single packed array of 16 octets in binary format. The optional third
line specifies the initialization vector (IV) as a hexadecimal string to
be used instead of the segment sequence number (default) for encryption.
Changes to key_info_file will result in segment encryption with the new
key/IV and an entry in the playlist for the new key URI/IV.

Key info file format:
<key URI>
<key file path>
<IV> (optional)

Example key URIs:
http://server/file.key
/path/to/file.key
file.key

Example key file paths:
file.key
/path/to/file.key

Example IV:
0123456789ABCDEF0123456789ABCDEF

Example:
ffmpeg -f lavfi -i testsrc -c:v h264 -hls_key_info_file file.keyinfo
foo.m3u8

file.keyinfo:
http://server/file.key
/path/to/file.key
0123456789ABCDEF0123456789ABCDEF

Example shell script:
BASE_URL=${1:-'.'}
openssl rand 16 > file.key
echo $BASE_URL/file.key > file.keyinfo
echo file.key >> file.keyinfo
echo $(openssl rand -hex 16) >> file.keyinfo
ffmpeg -f lavfi -re -i testsrc -c:v h264 -hls_flags delete_segments \
  -hls_key_info_file file.keyinfo out.m3u8
--

Signed-off-by: Christian Suloway <csuloway@globaleagleent.com>
Signed-off-by: Dan Dennedy <dan@dennedy.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-16 03:25:31 +02:00
Michael Niedermayer
efcf8cfa48 Merge commit '24ad3ac6a3e20350214e6c3f7a931635f264ae07'
* commit '24ad3ac6a3e20350214e6c3f7a931635f264ae07':
  nut: Drop doxygen markers

Conflicts:
	libavformat/nut.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-15 21:41:20 +02:00
Michael Niedermayer
c5fc48fdfb Merge commit '07b2db81d06e1cd6b1718d3e2dd7a42e8bccf8c0'
* commit '07b2db81d06e1cd6b1718d3e2dd7a42e8bccf8c0':
  riff: Add MNM4 FourCC as mpeg4

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-15 21:18:13 +02: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
2222f419da 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: Michael Niedermayer <michaelni@gmx.at>
2015-06-14 21:40:08 +02: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
Andreas Cadhalpun
ed0b1db640 doc: fix spelling errors
Neccessary -> Necessary
formated   -> formatted
thee       -> the
eventhough -> even though
seperately -> separately

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-06-14 15:09:33 +02:00
James Almer
4aebaed0e1 avformat/singlejpeg: fix standalone compilation 2015-06-13 17:47:13 -03:00
Carl Eugen Hoyos
3323c5f353 Remove a few occurences of "long long" from the libraries. 2015-06-13 09:28:41 +02:00
Michael Niedermayer
00ebf89dcd Merge commit 'a7ac1a7b94447f33ae95be4d6d186e2775977f91'
* commit 'a7ac1a7b94447f33ae95be4d6d186e2775977f91':
  flv: Name an enum and use its type

Conflicts:
	libavformat/flvdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-12 22:55:49 +02:00
Michael Niedermayer
449c74f629 Merge commit '8a78ae2d2101622fd244b99178d8bc61175c878e'
* commit '8a78ae2d2101622fd244b99178d8bc61175c878e':
  segment: Check open_null_ctx() return value

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-12 22:10:47 +02:00
Michael Niedermayer
d0061e77cd avformat/mxfdec: Detect jpeg2000 through codec_ul too
Fixes Ticket2345

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-12 19:40:48 +02:00
wm4
7e240f9581 matroskadec: verify seekhead IDs
Some files have SeekHead elements with broken IDs. They mismatch with
the ID of the destination element. These files are written by
"IDMmkvlib0.1" (as identified by the MuxingApp and WritingApp elements),
and the SeekHead IDs are actually endian-swapped.

This confuses the SeekHead logic of the demuxer. It will read some
elements twice, because the SeekHead ID is used to identify and remember
already read elements. With the file at hand, the stream list was
duplicated by reading the Tracks element twice.

Fix this by rejecting invalid EBML IDs in SeekHead entries. (This fix is
relatively specific to the broken file at hand, and doesn't protect
against some other cases of broken SeekHead, such as valid but
mismatching target element IDs.)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-12 19:30:11 +02: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
Michael Niedermayer
d59a033a69 avformat/mpegts: recognizes and export private streams
Based on patch by Wolfgang Lorenz <wl-chmw@gmx.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-12 13:59:00 +02:00
Michael Niedermayer
4e640f0560 avformat/avio: move short seek threshold to the context
This allows us to adjust it internally.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-11 13:42:06 +02:00
Michael Niedermayer
70af8a5efb avformat/aiffdec: avoid double and ldexp()
There is no support for non integer sample rates, using doubles/floats currently could
only lead to rounding differences between platforms

Previous version Reviewed-by: Mark Harris <mark.hsj@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-11 13:09:46 +02:00
Deliang Fu
6e1f8780c8 avformat: Fix bug in parse_rps for HEVC.
Make the logic in libavformat/hevc.c parse_rps align with libavcodec/hevc_ps.c ff_hevc_decode_short_term_rps

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-11 02:31:53 +02:00
Michael Niedermayer
9e40bd50e1 avformat/movenc: Make static packed_size, const static
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-11 00:48:41 +02:00
Michael Niedermayer
c465254fbf avformat/mpegts: Do not ignore registration descriptors when probing is enabled
This is required for the (not yet in git) private stream detection/export,
no other testcase known

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-10 23:50:46 +02:00
Stephan Holljes
de3a7ef204 lavf/http: Correctly terminate session with HTTP POST client.
Send a footer to correctly close client sockets.
This fixes network errors in client applications.

Signed-off-by: Stephan Holljes <klaxa1337@googlemail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-10 18:17:28 +02:00
Igor Derzhavin
203f9c8ff0 libavformat/flvdec.c: don't build index_entries for input stream if AVIOContext is not seekable
Signed-off-by: Igor Derzhavin <igor.derzhavin@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-10 16:22:11 +02: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
Vignesh Venkatasubramanian
34ae98a771 lavf/webm_chunk: Remove AVFMT_ALLOW_FLUSH
The flag was set unintentionally and the code will break if a NULL
packet is passed in.

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-09 21:19:57 +02:00
Michael Niedermayer
32b1131fc1 avformat/oggenc: Fix return code in case of flushing
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-09 18:42:55 +02:00
Michael Niedermayer
dac7b27802 Merge commit 'b14086ca38efa1a86cb0f0c6aa147b05f698877b'
* commit 'b14086ca38efa1a86cb0f0c6aa147b05f698877b':
  mkv: Correctly report the latest packet had been flushed

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-09 18:30:24 +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
Rodger Combs
e60b018c74 lavf/segment: add an option to allow breaking on non-keyframes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-09 13:26:00 +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
Rodger Combs
ecefce41d9 lavf/tls_securetransport: fix SNI support when not verifying
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-09 01:06:32 +02:00
James Almer
1382add59d 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

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-06-08 18:26:42 -03:00
Michael Niedermayer
d5a645625d Merge commit '4733a12dd17a91d606e0079ff9bb48b9f419cbef'
* commit '4733a12dd17a91d606e0079ff9bb48b9f419cbef':
  rtpdec_asf: Check memory allocation and free memory on error

Conflicts:
	libavformat/rtpdec_asf.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-08 23:05:01 +02:00