Commit Graph

13724 Commits

Author SHA1 Message Date
Michael Niedermayer
2f8418b584 Merge commit '28ff439efd2362fb21e1a78610737f2e26a72d8f'
* commit '28ff439efd2362fb21e1a78610737f2e26a72d8f':
  mvi: Add sanity checking for the audio frame size

Conflicts:
	libavformat/mvi.c

See: ea1d8465e6
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-29 23:24:27 +02:00
Michael Niedermayer
17049bff64 Merge commit 'adc09136a4a63b152630abeacb22c56541eacf60'
* commit 'adc09136a4a63b152630abeacb22c56541eacf60':
  xwma: Avoid division by zero

Conflicts:
	libavformat/xwma.c

See: a3cb7f992f
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-29 22:59:49 +02:00
Michael Niedermayer
3a3ebc7c7d Merge commit '8d07258bb6063d0780ce2d39443d6dc6d8eedc5a'
* commit '8d07258bb6063d0780ce2d39443d6dc6d8eedc5a':
  avidec: Make sure a packet is large enough before reading its data

Conflicts:
	libavformat/avidec.c

See: 028cc42a16
Note: data!=NULL implies that the allocated array is at least FF_INPUT_BUFFER_PADDING_SIZE large
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-29 22:56:15 +02:00
Michael Niedermayer
b24f7cf950 Merge commit '68ff9981283a56c731f00c2ee7901103665092fc'
* commit '68ff9981283a56c731f00c2ee7901103665092fc':
  vqf: Make sure the bitrate is in the valid range

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-29 22:42:31 +02:00
Michael Niedermayer
554c22c710 Merge commit '9277050e2918e0a0df9689721a188a604d886616'
* commit '9277050e2918e0a0df9689721a188a604d886616':
  vqf: Make sure sample_rate is set to a valid value

See: e481ba2ed7
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-29 22:35:06 +02:00
Martin Storsjö
28ff439efd mvi: Add sanity checking for the audio frame size
This avoids a division by zero.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 19:57:43 +03:00
Martin Storsjö
adc09136a4 xwma: Avoid division by zero
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 19:56:44 +03:00
Martin Storsjö
8d07258bb6 avidec: Make sure a packet is large enough before reading its data
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 19:56:22 +03:00
Martin Storsjö
68ff998128 vqf: Make sure the bitrate is in the valid range
Even if the sample rate is valid, an invalid bitrate could
pass the mode combination test below.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 18:46:39 +03:00
Martin Storsjö
9277050e29 vqf: Make sure sample_rate is set to a valid value
This avoids divisions by zero later (and possibly assertions in
time base scaling), since an invalid rate_flag combined with an
invalid bitrate below could pass the mode combination test.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 18:46:21 +03:00
Michael Niedermayer
f2eb474a5a avformat/mpegenc: check, warn and clip muxrate to syntactical possible values
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-29 17:02:57 +02:00
Michael Niedermayer
8c1253c934 avformat/mpegenc: check, warn and clip VBV value to within syntactically possible values
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-29 17:02:06 +02:00
Michael Niedermayer
28d35dbe9f avformat/mpegenc: fix muxrates AVOption maximum value
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-29 17:00:54 +02:00
Michael Niedermayer
a0fec71ebd avformat/mxfenc: instance number is just 24 bits
Fixes assertion failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-29 14:33:40 +02:00
Carl Eugen Hoyos
d87ff55502 Remove an incorrect and unneeded assert in the amr demuxer.
Asserting a specific codec is not correct since libavformat
allows forcing a codec, an equivalent check is in the
following line.

Fixes ticket #3001.
2013-09-29 07:11:56 +02:00
Matthieu Bouron
c461265a76 lavf/mxfdec: add j2k codec to intra only codecs
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-28 22:57:52 +02:00
Michael Niedermayer
a63b479d11 avformat/utils: factor find_decoder() out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-28 18:11:13 +02:00
Paul B Mahol
07da0854fe avformat/vfq: fix deadlock in vqf_read_header()
Fixes #3010.
Reported-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-28 15:36:54 +00:00
Michael Niedermayer
9790a03e67 avformat/mxfdec: check sample size more completely
Fixes division by zero
Fixes Ticket2992

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-27 19:09:15 +02:00
Michael Niedermayer
df21537dfb avformat/tls: fix {} error for the GNUTLS case
Found-by:" Geek.Song" <ffmpeg@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-27 15:59:19 +02:00
Michael Niedermayer
d8d235ffe9 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  lxf: check the nb_streams instead of relying on padding

Conflicts:
	libavformat/lxfdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-27 13:27:31 +02:00
Michael Niedermayer
e82071e727 Merge commit '839df90c718dcab9b9e91ca3c7e73479b3e8103c'
* commit '839df90c718dcab9b9e91ca3c7e73479b3e8103c':
  lxf: Support 16-channel files
  lxf: Support version 1 files

Conflicts:
	libavformat/lxfdec.c

See: e701b0cf75
See: 1a06d6dd86
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-27 12:31:15 +02:00
Michael Niedermayer
72eddc10fa Merge commit 'd872fb0f7ff2ff0ba87f5ccf6a1a55ca2be472c9'
* commit 'd872fb0f7ff2ff0ba87f5ccf6a1a55ca2be472c9':
  lavf: Reset the entry count and allocation size variables on av_reallocp failures

Conflicts:
	libavformat/avienc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-27 12:13:41 +02:00
Michael Niedermayer
328a5b93d3 Merge commit '06ebc0bf9a6401733a4ce1310325de19f631819a'
* commit '06ebc0bf9a6401733a4ce1310325de19f631819a':
  lavf: Allocate arrays with av_realloc if they will be realloced later

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-27 11:45:37 +02:00
Michael Niedermayer
47c5c942f8 Merge commit '1af78b865b66acb8020c54262f12aa41ad47e05c'
* commit '1af78b865b66acb8020c54262f12aa41ad47e05c':
  rtpdec_qt: Add an accidentally removed allocation return value check

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-27 11:38:49 +02:00
Michael Niedermayer
f31c36e552 Merge commit '705b748e8d8612385c96428ae36ed0d42a170d93'
* commit '705b748e8d8612385c96428ae36ed0d42a170d93':
  tls: Add support for listen mode

Conflicts:
	doc/protocols.texi
	libavformat/tls.c
	libavformat/version.h

See: 4f4eb380f0
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-27 11:33:19 +02:00
Michael Niedermayer
689a1bd917 Merge commit '5c53bf7aaf03748464cbf978bffe7ffdb71112b1'
* commit '5c53bf7aaf03748464cbf978bffe7ffdb71112b1':
  http: Pass options through to the nested protocol

Conflicts:
	libavformat/http.c

See: b6f435fbc8
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-27 10:38:04 +02:00
Michael Niedermayer
e6e71fd7b5 Merge commit '8b09d917e7dc7d7f2ace31419f802d4ff518236c'
* commit '8b09d917e7dc7d7f2ace31419f802d4ff518236c':
  tls: Add options for verifying the peer certificate

Conflicts:
	doc/protocols.texi
	libavformat/tls.c
	libavformat/version.h

See: b2460858f6
See: 973a758f52
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-27 09:33:28 +02:00
Luca Barbato
5c349ad08a lxf: check the nb_streams instead of relying on padding
Remove the now unneeded stream pointer while at it.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-09-27 01:33:46 +02:00
Paul B Mahol
a529fa2f4d lxf: remove deplanarization hack
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-09-27 01:33:46 +02:00
Carl Eugen Hoyos
839df90c71 lxf: Support 16-channel files
Reported, analyzed and tested by Gabriel Gerard.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-09-27 01:33:45 +02:00
Paul B Mahol
7e52080cb1 pcm: support 24-bit/32-bit little-endian planar
Used by LXF.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-09-27 01:33:45 +02:00
Reimar Döffinger
779951cd2c lxf: Support version 1 files
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-09-27 01:33:45 +02:00
Martin Storsjö
d872fb0f7f lavf: Reset the entry count and allocation size variables on av_reallocp failures
When av_reallocp fails, the associated variables that keep track of
the number of elements in the array (and in some cases, the
separate number of allocated elements) need to be reset.

Not all of these might technically be needed, but it's better to
reset them if in doubt, to make sure variables don't end up
conflicting.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-26 23:14:03 +03:00
Martin Storsjö
06ebc0bf9a lavf: Allocate arrays with av_realloc if they will be realloced later
Pointers returned from av_malloc can't in general be passed
to av_realloc.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-26 23:13:53 +03:00
Martin Storsjö
1af78b865b rtpdec_qt: Add an accidentally removed allocation return value check
This check was mistakenly removed in 5626f994f.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-26 23:13:50 +03:00
Martin Storsjö
705b748e8d tls: Add support for listen mode
Also add options for specifying a certificate and key, which can
be used both when operating as client and as server.

Partially based on a patch by Peter Ross.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-26 23:13:35 +03:00
Martin Storsjö
5c53bf7aaf http: Pass options through to the nested protocol
When passing a dict to the nested protocol, it will consume
the used options from it, so a separate copy needs to be used
when reopening the connection multiple times.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-26 23:13:16 +03:00
Martin Storsjö
8b09d917e7 tls: Add options for verifying the peer certificate
A file containing the trusted CA certificates needs to be
supplied via the ca_file AVOption, unless the TLS library
has got a system default file/database set up.

This doesn't check the hostname of the peer certificate with
openssl, which requires a non-trivial piece of code for
manually matching the desired hostname to the string provided
by the certificate, not provided as a library function.

That is, with openssl, this only validates that the received
certificate is signed with the right CA, but not that it is
the actual server we think we're talking to.

Verification is still disabled by default since we can't count
on a proper CA database existing at all times.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-26 23:13:06 +03:00
Michael Niedermayer
5dc6c0ea9e avformat/mpegts: check avio_tell() return code before using it
Fixes Ticket2962

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-26 16:43:55 +02:00
Michael Niedermayer
e024953722 avformat/wavdec: check smv_frames_per_jpeg
Values outside would not be possible due to limitations of jpeg itself

Fixes very long running loop
Fixes Ticket2977

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-26 14:56:32 +02:00
Michael Niedermayer
cd05c4060a avformat/mpegenc: minor simplification / use AV_WB16()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-26 13:36:45 +02:00
Michael Niedermayer
32cde96296 avformat/mpegenc: Better heuristic for ordering packets
This prevents underflows in quite constrained cases

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-26 03:13:38 +02:00
Michael Niedermayer
930406325c avformat/mpegenc: Better default for max_delay
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-26 03:12:20 +02:00
Michael Niedermayer
b637118086 avformat/mpegenc: change assert to av_assert0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-26 02:16:12 +02:00
Michael Niedermayer
ddd0e23d58 avformat/mpegenc: improve field names in underflow error message
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-26 01:07:24 +02:00
Michael Niedermayer
57070d9892 Merge commit '668643b9239c70b777aea322eab411ebc960d9a0'
* commit '668643b9239c70b777aea322eab411ebc960d9a0':
  matroskadec: check av_strdup() when setting defaults

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-25 09:39:24 +02:00
Anton Khirnov
668643b923 matroskadec: check av_strdup() when setting defaults 2013-09-24 17:11:50 +02:00
Michael Niedermayer
fb45de779c avformat/omadec: simplify checks in nprobe()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-24 00:29:02 +02:00
Michael Niedermayer
8c766228c1 Merge commit 'f2b00a5372bfa1d82a8ab99cb8eafac8a9473494'
* commit 'f2b00a5372bfa1d82a8ab99cb8eafac8a9473494':
  movenc: Return a proper error code for invalid combinations

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 14:40:18 +02:00