Commit Graph

13869 Commits

Author SHA1 Message Date
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
Michael Niedermayer
eeeb3c8fa3 Merge commit 'f7e616959aff8706edccdae763c24c897c449f6f'
* commit 'f7e616959aff8706edccdae763c24c897c449f6f':
  electronicarts: Check packet sizes before reading

Conflicts:
	libavformat/electronicarts.c

See: fb1ea777b3
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 14:27:09 +02:00
Michael Niedermayer
ef7e8efc6b Merge commit 'ce67f442be0f6c4a8794272873852e256b5b8ee4'
* commit 'ce67f442be0f6c4a8794272873852e256b5b8ee4':
  lavf: Avoid setting avg_frame_rate if delta_dts is negative

Conflicts:
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 14:19:13 +02:00
Michael Niedermayer
341dc59053 Merge commit 'f1eac2b8a0370b908cd691086d11f51342054730'
* commit 'f1eac2b8a0370b908cd691086d11f51342054730':
  movenc: Use keyframes as default fragmentation point in ismv

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 13:09:53 +02:00
Michael Niedermayer
d4574b7608 Merge commit 'a9553bbb336a7186c62b3b14a0499c1b6ba61ebd'
* commit 'a9553bbb336a7186c62b3b14a0499c1b6ba61ebd':
  movenc: Set all implicit flags immediately in mov_write_header

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 12:24:19 +02:00
Michael Niedermayer
b189c699b9 Merge commit '187023f6b2b43966acb2449a379b4ededdc4b22e'
* commit '187023f6b2b43966acb2449a379b4ededdc4b22e':
  movenc: Set mov->mode earlier in mov_write_header

Conflicts:
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 12:17:10 +02:00
Michael Niedermayer
03e9506aae Merge commit '5055035670bd1a1eaca64bd3bc71fb07de9df2c3'
* commit '5055035670bd1a1eaca64bd3bc71fb07de9df2c3':
  tls: Do not abort on non-fatal TLS alerts with gnutls

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 12:01:53 +02:00
Michael Niedermayer
09e06cd90f Merge commit 'c951e4b442df9dde6051634a85359eb809bf2142'
* commit 'c951e4b442df9dde6051634a85359eb809bf2142':
  flv: Make onTextData parsing robust

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 11:56:29 +02:00
Michael Niedermayer
eaa20afa76 Merge commit 'ba77757a7efafe38924b6b423acfca8c1e1c62d6'
* commit 'ba77757a7efafe38924b6b423acfca8c1e1c62d6':
  rtmp: Replace a magic number with a macro

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 11:45:38 +02:00
Michael Niedermayer
c70e647a15 Merge commit '5840473890440dbe0bd2cce530ebb3d93e187ae6'
* commit '5840473890440dbe0bd2cce530ebb3d93e187ae6':
  rtmp: Rewrite embedded flv handling

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 11:40:15 +02:00
Michael Niedermayer
eee8cb42d0 Merge commit 'e40a0e822801d2485e4e555909d7a82713fa86a5'
* commit 'e40a0e822801d2485e4e555909d7a82713fa86a5':
  rtmp: Refactor get_packet

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 11:36:06 +02:00
Michael Niedermayer
f3a02f4bc1 Merge commit '32a414f316c7f0eea877370e3f9d9f25afbf5da2'
* commit '32a414f316c7f0eea877370e3f9d9f25afbf5da2':
  rtmp: Support AMF_DATA_TYPE_MIXEDARRAY

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-23 11:31:13 +02:00
Martin Storsjö
b6c7bd53f4 movenchint: Clear size and len if the realloc failed
Previously these were left in an inconsistent state.

Pointed out by Michael Niedermayer.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-22 21:02:52 +03:00
Martin Storsjö
f2b00a5372 movenc: Return a proper error code for invalid combinations
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-22 21:02:52 +03:00
Martin Storsjö
f7e616959a electronicarts: Check packet sizes before reading
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-22 21:02:52 +03:00
Martin Storsjö
ce67f442be lavf: Avoid setting avg_frame_rate if delta_dts is negative
This avoids setting avg_frame_rate to invalid (negative)
values.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-22 21:02:52 +03:00
Michael Niedermayer
a5cbf1991c avformat/mov: reset extradata size when extradata gets deallocated due to realloc failure
This prevents the fields from becoming inconsistent

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-22 16:11:02 +02:00
Martin Storsjö
f1eac2b8a0 movenc: Use keyframes as default fragmentation point in ismv
Fragmenting blindly to a certain duration isn't a good choice
if one should be able to switch between different qualities,
therefore default to keyframes instead.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-22 16:10:21 +03:00
Martin Storsjö
a9553bbb33 movenc: Set all implicit flags immediately in mov_write_header
This makes sure other sanity checks for conflicting options
can work properly, e.g. for the conflict between the faststart
flag when using the ismv mode.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-22 16:10:21 +03:00
Martin Storsjö
187023f6b2 movenc: Set mov->mode earlier in mov_write_header
This allows simplifying some early checks that depend on the
muxer mode.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-22 16:10:21 +03:00
Martin Storsjö
5055035670 tls: Do not abort on non-fatal TLS alerts with gnutls
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-22 16:10:21 +03:00
Michael Niedermayer
05b7a635dc avformat/movenchint: use realloc_array() to protect against integer overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-22 15:06:22 +02:00
Michael Niedermayer
63621762ec avformat/movenchint: only change queue size if reallocation succeeded
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-22 15:05:35 +02:00
Michael Niedermayer
091ba02cc8 avformat/movenchint: revert "Use av_reallocp() where suitable"
reverts movenchin part of 5626f994f2
The change left the fields in an inconsistent state

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-22 15:00:08 +02:00
Luca Barbato
c951e4b442 flv: Make onTextData parsing robust
Certain streaming servers do not preserve the order of the fields.
2013-09-22 01:10:17 +02:00
Luca Barbato
ba77757a7e rtmp: Replace a magic number with a macro
11 is the RTMP header size.
2013-09-22 01:09:33 +02:00
Luca Barbato
5840473890 rtmp: Rewrite embedded flv handling
Use update_offset() as done for rtmp audio, video and notifications and
read update and write the fields instead of replacing them in the rtmp
packet and then memcpying it to the output buffer.
2013-09-22 01:09:33 +02:00
Luca Barbato
e40a0e8228 rtmp: Refactor get_packet 2013-09-22 01:09:33 +02:00
Luca Barbato
32a414f316 rtmp: Support AMF_DATA_TYPE_MIXEDARRAY
And fix the AMF_DATA_TYPE_ARRAY parsing while at it.

A MIXEDARRAY type, as the ARRAY, store the number of elements in
an uint32 before the list. The ARRAY is strict and does not have
an OBJECT terminator, MIXEDARRAY behaves like an OBJECT type and
a different than stated number of element can be present.
2013-09-22 01:06:42 +02:00
Michael Niedermayer
21a2b97365 avformat/hls: do not limit manifest lines to 1024 chars
Fixes Ticket2976
Debuged-by: jaimeMF
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-21 20:59:30 +02:00
Michael Niedermayer
b8a954e46d avformat/network: fix duplicate include
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-21 16:58:58 +02:00
Michael Niedermayer
49515cb840 avformat: remove duplicate includes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-21 15:36:33 +02:00
James Almer
56f17407bc matroska: Add the CueDuration element
Use it only on subtitle CuePoints.
With proper demuxer/splitter support this should improve the display
of subtitles right after seeking to a given point in the stream.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-21 14:33:01 +02:00
Michael Niedermayer
d0171eb8d7 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  h264dec: Add .avc file name extension

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-21 11:57:19 +02:00
Michael Niedermayer
de493809f3 Merge commit '01f111bdb21b4ea6d2ff3ea919d70ae9ca451cf9'
* commit '01f111bdb21b4ea6d2ff3ea919d70ae9ca451cf9':
  h264dec: K&R formatting cosmetics

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-21 11:09:41 +02:00
Lukasz Marek
5b153f8164 lavf: add SFTP protocol via libssh
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-21 03:26:54 +02:00
Michael Niedermayer
15672e832f avformat/utils: remove unused variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-20 23:19:29 +02:00
Michael Niedermayer
fcd64dcc37 avformat/avienc: remove unused variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-20 22:50:06 +02:00
James Almer
39442b1a1b matroskaenc: Add CuePoints for subtitle tracks
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-20 22:40:16 +02:00
Vittorio Giovara
944c338430 h264dec: Add .avc file name extension
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-09-20 21:08:02 +02:00
Vittorio Giovara
01f111bdb2 h264dec: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-09-20 21:06:23 +02:00
Michael Niedermayer
dda7bd13b3 Merge commit '5532ee6d7d554bb54d4374d0b69f72bc9ab9fd91'
* commit '5532ee6d7d554bb54d4374d0b69f72bc9ab9fd91':
  rtmp: Unbreak get_packet

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-20 15:45:04 +02:00
Michael Niedermayer
391e272c16 Merge commit 'b97b1adb3f807e1acd00d56319ee6cb41cc727e4'
* commit 'b97b1adb3f807e1acd00d56319ee6cb41cc727e4':
  rtmpproto: Add a comment explaining the logic in handle_notify

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-20 15:30:51 +02:00
Michael Niedermayer
f657ca0d0b Merge commit 'd8798276b65543d921adadf63cc7f5ba2d1604af'
* commit 'd8798276b65543d921adadf63cc7f5ba2d1604af':
  r3d: Add more input value validation

Conflicts:
	libavformat/r3d.c

See: 99b1b2b1c6
See: df92ac1852
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-20 15:14:31 +02:00
Michael Niedermayer
2a930fa29e Merge commit '3ca14aa5964ea5d11f7a15f9fff17924d6096d44'
* commit '3ca14aa5964ea5d11f7a15f9fff17924d6096d44':
  rl2: Avoid a division by zero

See: f371396dfb
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-20 14:58:07 +02:00
Michael Niedermayer
6c18775bae Merge commit '83c285f88016b087c2f0f4b9ef356ad8ef12d947'
* commit '83c285f88016b087c2f0f4b9ef356ad8ef12d947':
  wtv: Add more sanity checks for a length read from the file

Conflicts:
	libavformat/wtv.c

See: c42efad3c3
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-20 14:51:02 +02:00
Michael Niedermayer
09b09ef4ab Merge commit 'd8b68660145c76a23fc9665f96932449514ecad2'
* commit 'd8b68660145c76a23fc9665f96932449514ecad2':
  yop: Clear all references to the AVBuffer in the local AVPacket

Conflicts:
	libavformat/yop.c

See: 551f683861
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-20 14:37:52 +02:00
Luca Barbato
5532ee6d7d rtmp: Unbreak get_packet
Commit 5626f994f2 broke it.
2013-09-20 13:38:22 +02:00
Michael Niedermayer
35a8387b40 Merge commit '72fe16a13e3ebd5396ac173bf84c8b20085c16d5'
* commit '72fe16a13e3ebd5396ac173bf84c8b20085c16d5':
  movenc: Use null buffers for measuring the amount of data to be written

Conflicts:
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-20 12:37:24 +02:00
Michael Niedermayer
2ad8056c5e Merge commit '3627ce2f1dab1d33b7f99d78907a3e4d86b7d847'
* commit '3627ce2f1dab1d33b7f99d78907a3e4d86b7d847':
  aviobuf: Add functions for null buffers

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-20 12:26:09 +02:00
Michael Niedermayer
04ee57ce0a Merge commit 'bb461370e34b1fa1637f34ce7d37b934ddb472d5'
* commit 'bb461370e34b1fa1637f34ce7d37b934ddb472d5':
  asfenc: mux chapters in ASF files using an ASF "marker" section

Conflicts:
	Changelog
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-20 12:06:15 +02:00
Michael Niedermayer
018e0db5ef Merge commit '09f3c937ed6fd7c5bd64450d45f73b0f4975f4c9'
* commit '09f3c937ed6fd7c5bd64450d45f73b0f4975f4c9':
  asfenc: remember send time and offset of the index entries

Conflicts:
	libavformat/asfenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-20 11:43:32 +02:00
Michael Niedermayer
c6b4258965 Merge commit '1eb932803037a3c9f98f66aeb80024dfa3c5c743'
* commit '1eb932803037a3c9f98f66aeb80024dfa3c5c743':
  asfenc: add ASF_Reserved_4 as defined in section 10.10 of the ASF spec

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-20 11:18:20 +02:00
Michael Niedermayer
c6526620a9 Merge commit 'c53b5dda352452e79a9e962cd4c74c813186d9ed'
* commit 'c53b5dda352452e79a9e962cd4c74c813186d9ed':
  asfdec: replace magic constant with DATA_HEADER_SIZE

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-20 11:06:23 +02:00
Michael Niedermayer
c16470d77a Merge commit '5f408333601a827054335f309defcb246a532b21'
* commit '5f408333601a827054335f309defcb246a532b21':
  asfdec: substract preroll time from marker presentation time

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-20 10:57:20 +02:00
Martin Storsjö
b97b1adb3f rtmpproto: Add a comment explaining the logic in handle_notify
This explains why the cleanup in 5626f994f was wrong and why
ae0f316a was needed.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-20 10:47:15 +03:00
Monty Montgomery
f6622f9610 avformat/matroskadec: correct spurious keyframe warnings in webm
Minor change to fix for Trac #1003 to avoid squawking about files
with valid keyframes that aren't marked (as opposed to frames that are
marked as keyframes and aren't).

Change correctly surpresses the spurious warnings, while still complaining
about (and handling) the genuinely broken file attached to bug #1003.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-20 03:45:02 +02:00
Paul B Mahol
3e2a5b33f0 avformat/matroskadec: use av_malloc_array() and check for allocation error
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-19 22:28:25 +00:00
Michael Niedermayer
63139f62f3 avformat/bmv: remove unused variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-19 22:04:34 +02:00
Martin Storsjö
d8798276b6 r3d: Add more input value validation
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-19 22:47:26 +03:00
Martin Storsjö
3ca14aa596 rl2: Avoid 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-19 22:47:00 +03:00
Martin Storsjö
83c285f880 wtv: Add more sanity checks for a length read from the file
Also make sure the existing length check can't overflow.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-19 22:46:35 +03:00
Martin Storsjö
d8b6866014 yop: Clear all references to the AVBuffer in the local AVPacket
This makes sure that it doesn't try to free an AVBuffer belonging
to an earlier packet when we free the local packet at the end.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-19 22:46:21 +03:00
Martin Storsjö
82e266c6d3 segafilm: Validate the number of audio channels
This avoids divisions by zero later.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-19 22:45:40 +03:00
Martin Storsjö
72fe16a13e movenc: Use null buffers for measuring the amount of data to be written
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-19 22:42:40 +03:00
Martin Storsjö
3627ce2f1d aviobuf: Add functions for null buffers
Null buffers are useful for simulating writing to a real buffer
for the sake of measuring how many bytes are written.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-19 22:42:37 +03:00
Vladimir Pantelic
bb461370e3 asfenc: mux chapters in ASF files using an ASF "marker" section
ASF markers only have a start time, so we lose the chapter end times,
but that is ASF for you

Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-09-19 19:51:49 +02:00
Vladimir Pantelic
09f3c937ed asfenc: remember send time and offset of the index entries
Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-09-19 19:37:59 +02:00
Vladimir Pantelic
1eb9328030 asfenc: add ASF_Reserved_4 as defined in section 10.10 of the ASF spec
Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-09-19 19:37:46 +02:00
Vladimir Pantelic
c53b5dda35 asfdec: replace magic constant with DATA_HEADER_SIZE
Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-09-19 19:37:37 +02:00
Vladimir Pantelic
5f40833360 asfdec: substract preroll time from marker presentation time
this was forgotten when we changed ASF to not output the preroll time

Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-09-19 19:37:28 +02:00
Michael Niedermayer
ad2a08388c avformat/concat: revert one hunk of 20dfab33f5
The deallocated memory contains resources that need to be freed before it
can be deallocated. The original code was correct.
This also fixes a double free

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-19 15:18:15 +02:00
Michael Niedermayer
8be56e464b avformat/smacker: Check if bufs has been allocated before use
Fixes null pointer dereference

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-19 14:20:21 +02:00
Michael Niedermayer
52dc3600a9 Merge commit 'bcbe4f3ceb6ee0210d3a401963518906c8b9b230'
* commit 'bcbe4f3ceb6ee0210d3a401963518906c8b9b230':
  idroqdec: Make sure a video stream has been allocated before returning packets

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-19 13:34:25 +02:00
Luca Barbato
fbd54827b1 rtmp: Unbreak handle_notify
Commit 5626f994f2 broke it.
2013-09-19 11:27:21 +02:00
Michael Niedermayer
20dfab33f5 Merge commit '5626f994f273af80fb100d4743b963304de9e05c'
* commit '5626f994f273af80fb100d4743b963304de9e05c':
  avformat: Use av_reallocp() where suitable

Conflicts:
	libavformat/avidec.c
	libavformat/avienc.c
	libavformat/aviobuf.c
	libavformat/oggparsevorbis.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-19 11:01:26 +02:00
Michael Niedermayer
f54d751f33 Merge commit '0f310a6f333b016d336674d086045e8473fdf918'
* commit '0f310a6f333b016d336674d086045e8473fdf918':
  rmdec: Validate the fps value

Conflicts:
	libavformat/rmdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-19 10:38:40 +02:00
Martin Storsjö
bcbe4f3ceb idroqdec: Make sure a video stream has been allocated before returning packets
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-19 11:09:04 +03:00
Luca Barbato
ae0f316a47 rtmp: Unbreak handle_notify
Commit 5626f994f2 broke it.
2013-09-19 09:13:04 +02:00
James Almer
ea70e2f2d7 matroskaenc: Write muxingapp and writingapp elements when using bitexact flag
Files won't validate with mkvalidtor if these two elements are missing.
Use a const "Lavf" string that wont change with library version bumps.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-18 23:06:59 +02:00
Justin Ruggles
c4bfa09807 Add a WebP decoder
Container and lossy decoding by Aneesh Dogra <aneesh@sugarlabs.org>
Lossless decoding by Justin Ruggles <justin.ruggles@gmail.com>
2013-09-18 14:10:05 -04:00
Alexandra Khirnova
5626f994f2 avformat: Use av_reallocp() where suitable
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-09-18 18:28:38 +02:00
Michael Niedermayer
b7e7d8cdaf Merge remote-tracking branch 'qatar/master'
* qatar/master:
  movenc: Add an option for omitting the tfhd base offset

Conflicts:
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-18 13:32:55 +02:00
Michael Niedermayer
66e199bd75 Merge commit 'a4adabb460ace39783d707a5b3bbe28b4b5b9dc4'
* commit 'a4adabb460ace39783d707a5b3bbe28b4b5b9dc4':
  movenc: Write the moof atom in two passes

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-18 12:47:55 +02:00
Michael Niedermayer
4131a3cb58 Merge commit '8583b14252deac71136f1dec231910abab0ba503'
* commit '8583b14252deac71136f1dec231910abab0ba503':
  rtmp: Support reading interleaved chunks.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-18 12:09:06 +02:00
Michael Niedermayer
46cc498b77 Merge commit 'd4c2a3740fb95f952a87ba320d2bf31f126bdf68'
* commit 'd4c2a3740fb95f952a87ba320d2bf31f126bdf68':
  xmv: Add more sanity checks for parameters read from the bitstream

Conflicts:
	libavformat/xmv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-18 11:24:27 +02:00
Michael Niedermayer
c1840cbdbe Merge commit 'dc4acc820076b2149ef6c921bdabe05d07ca1bc6'
* commit 'dc4acc820076b2149ef6c921bdabe05d07ca1bc6':
  rtmpproto: Extend a comment to explain the prev_pkt arrays roles

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-18 11:09:31 +02:00
Michael Niedermayer
e81411e88e Merge commit '647d655d19c38e9716328e4787199149097d6089'
* commit '647d655d19c38e9716328e4787199149097d6089':
  rtmpproto: Consistently use the right prev_pkt array

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-18 11:00:51 +02:00
Michael Niedermayer
7742edc03b Merge commit '0d3784396b736374a61fea26268febdabd803a59'
* commit '0d3784396b736374a61fea26268febdabd803a59':
  rtmpproto: Check for the right return code

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-18 10:50:54 +02:00
Martin Storsjö
0f310a6f33 rmdec: Validate the fps value
Abort if it is invalid if strict error checking has been requested.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-18 11:30:06 +03:00
Martin Storsjö
e7bf085b78 movenc: Add an option for omitting the tfhd base offset
This makes the output fragments independent of their position in
the output stream, making the output work better when streamed.

QuickTime Player doesn't support fragmented mp4 without the base
data offset, though.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 23:30:31 +03:00
Martin Storsjö
a4adabb460 movenc: Write the moof atom in two passes
This is a bit more work, but avoids having to fill in
the data offset field afterwards instead of directly when
the rest of the trun atom is written.

This simplifies future cases where this field needs to be set to
something different.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 23:25:46 +03:00
Josh Allmann
8583b14252 rtmp: Support reading interleaved chunks.
A given packet won't always come in contiguously; sometimes
they may be broken up on chunk boundaries by packets of another
channel.

This support primarily involves tracking information about the
data that's been read, so the reader can pick up where it left
off for a given channel.

As a side effect, we no longer over-report the bytes read if
(toread = MIN(size, chunk_size)) == size

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 23:19:11 +03:00
Paul B Mahol
78f680cb36 avformat/smacker: use av_malloc_array() and check for allocation error
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-17 18:29:48 +00:00
Michael Niedermayer
7703d19c40 lavf/options_table: improve option help text
Contains text suggested by carl

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 19:47:58 +02:00
Chih-Wei Huang
985920433c avformat/asfenc: fix a build error
It's introduced by the erroneous merging commit cbe47b1e.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 19:34:53 +02:00
Martin Storsjö
d4c2a3740f xmv: Add more sanity checks for parameters read from the bitstream
Since the number of channels is multiplied by 36 and assigned to
to a uint16_t, make sure this calculation didn't overflow. (In
certain cases the calculation could overflow leaving the
truncated block_align at 0, leading to divisions by zero later.)

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 20:09:25 +03:00
Martin Storsjö
dc4acc8200 rtmpproto: Extend a comment to explain the prev_pkt arrays roles
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 20:09:25 +03:00
Martin Storsjö
647d655d19 rtmpproto: Consistently use the right prev_pkt array
prev_pkt[0] is used for input packets, while prev_pkt[1] is
used for output.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 20:09:24 +03:00
Martin Storsjö
0d3784396b rtmpproto: Check for the right return code
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 20:09:22 +03:00
Michael Niedermayer
7f20440b4c Merge commit '7f8d41eb097e8d4223c9caf97dd332a2fdb29d52'
* commit '7f8d41eb097e8d4223c9caf97dd332a2fdb29d52':
  mov: Don't use a negative duration for setting other fields

Conflicts:
	libavformat/mov.c

See: 87d073eacc
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 16:04:41 +02:00
Michael Niedermayer
a1fb3e5127 Merge commit '19b9659f3174599e8685d329c4330b1ea8c4c6db'
* commit '19b9659f3174599e8685d329c4330b1ea8c4c6db':
  oggparseogm: Convert to use bytestream2

Conflicts:
	libavformat/oggparseogm.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 15:50:21 +02:00
Michael Niedermayer
2c8d876dea Merge commit '569d18aa9dc989c37bb4d4b968026fe5afa6fff9'
* commit '569d18aa9dc989c37bb4d4b968026fe5afa6fff9':
  matroskadec: Verify realaudio codec parameters

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 15:25:45 +02:00
Michael Niedermayer
e960b3e27e avformat/utils: Print warning if reallocating probe buffer failed
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 13:09:24 +02:00
Michael Niedermayer
01b4689d20 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtmp: rename main_channel_id to stream_id.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 13:03:50 +02:00
Michael Niedermayer
208f9dd2ef Merge commit 'd4aef997809167832ecc64e89dda8cb445e5fe10'
* commit 'd4aef997809167832ecc64e89dda8cb445e5fe10':
  rtmp: Follow Flash player numbering for channels.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 12:57:19 +02:00
Michael Niedermayer
c71541d42a Merge commit '120af23cd5fcfc539d9575d17d403247ab17109b'
* commit '120af23cd5fcfc539d9575d17d403247ab17109b':
  rtmp: Send video on a separate channel.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 12:52:25 +02:00
Michael Niedermayer
3f760214b4 Merge commit '68b467742092364f9306283f40effde2c12efe08'
* commit '68b467742092364f9306283f40effde2c12efe08':
  lavf: Make probe_codec return an error code

Conflicts:
	libavformat/utils.c

A failure to reallocate should not free the array as it is used
to probe the codec. And failure to reallocate if the following
probe succeeds isnt a fatal error for probe_codec(). Thus this
is only partially merged to ensure probing still is attempted
with the data available.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 12:44:31 +02:00
Michael Niedermayer
7b836487a9 Merge commit '73084391588b0f150737990038829cac5013dd68'
* commit '73084391588b0f150737990038829cac5013dd68':
  lavf: Don't explicitly flush after each written packet in muxers

Conflicts:
	libavformat/assenc.c
	libavformat/yuv4mpeg.c

See: 8de9bb6e5e

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 12:16:55 +02:00
Michael Niedermayer
96e6447d62 Merge commit '596e5d4783ca951258a7c580951fd161f1785ec1'
* commit '596e5d4783ca951258a7c580951fd161f1785ec1':
  lavf: Add a flag to enable/disable per-packet flushing

Conflicts:
	libavformat/avformat.h
	libavformat/mux.c
	libavformat/version.h

This adds a 2nd API to set per packet flushing
If the user application indicates through either a non default then this non default takes
precedence over the other still default value

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 12:01:35 +02:00
Michael Niedermayer
22f79a2d60 Merge commit '0a9425d7cfdf0113c3d32096c9406823efe0cd0a'
* commit '0a9425d7cfdf0113c3d32096c9406823efe0cd0a':
  flv: Do not export datastream as metadata

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 11:44:02 +02:00
Michael Niedermayer
a275ff7e01 Merge commit '92ed83e393d25b6d15920e90d56ee77de54a9728'
* commit '92ed83e393d25b6d15920e90d56ee77de54a9728':
  rtmp: Store all the notify messages

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 11:39:45 +02:00
Michael Niedermayer
9589b61904 Merge commit 'fe0337e89bbbe84b7274fbb0d9d56ed992937931'
* commit 'fe0337e89bbbe84b7274fbb0d9d56ed992937931':
  rtmp: Do not send the first field twice within the handshake

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 11:34:30 +02:00
Michael Niedermayer
c9eb2ce085 Merge commit '666ed7eda1d568638689ac7b0cef0a9e564ffbdf'
* commit '666ed7eda1d568638689ac7b0cef0a9e564ffbdf':
  rtmp: Drop an unneeded warning

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 11:28:16 +02:00
Michael Niedermayer
953a4191b8 Merge commit 'ffb7669e47343ac0caa866361965fdb2bf6ed825'
* commit 'ffb7669e47343ac0caa866361965fdb2bf6ed825':
  rtmp: Support play method in listen mode

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 11:22:54 +02:00
Michael Niedermayer
0483cfe8ca Merge commit '97d35fa89f73468d64f663bfc0686aa6cddd8b6a'
* commit '97d35fa89f73468d64f663bfc0686aa6cddd8b6a':
  rtmp: Factor out publish specific code

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 11:17:11 +02:00
Martin Storsjö
7f8d41eb09 mov: Don't use a negative duration for setting other fields
Some files have the duration set to -1 in the mdhd atom, more
or less legitimately. (We produce such files ourselves, for the
initial duration in fragmented mp4 files.)

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 11:33:37 +03:00
Martin Storsjö
19b9659f31 oggparseogm: Convert to use bytestream2
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 11:33:37 +03:00
Martin Storsjö
569d18aa9d matroskadec: Verify realaudio codec parameters
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 11:22:30 +03:00
Josh Allmann
f8d1bb6723 rtmp: rename main_channel_id to stream_id.
This more closely corresponds to the usage of the field.
Its usage here is unrelated to the channel ID.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 11:03:36 +03:00
Josh Allmann
d4aef99780 rtmp: Follow Flash player numbering for channels.
Channel 4 is typically used by the Flash player to transmit
audio, channel 6 for video, and various stream-specific invokes
get sent over channel 8, which is designated the source channel.

This more closely matches the behavior of the Flash player,
including the transmission of play requests over channel 8.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 11:03:36 +03:00
Josh Allmann
120af23cd5 rtmp: Send video on a separate channel.
Sending non-monotonic packets (e.g. when the audio and video
streams are monotonic within themselves but not muxed
monotonically) will lead to negative values the RTMP timestamp
field (where timestamps are transmitted only as deltas for each
channel), and this delta can end up being incorrectly written as
a large unsigned number.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 11:03:36 +03:00
Michael Niedermayer
7dea2eab7e Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
  Do not suggest to increase probesize for image2 files.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 00:27:40 +02:00
Carl Eugen Hoyos
5c2be81b39 Do not suggest to increase probesize for image2 files. 2013-09-17 00:08:12 +02:00
Vignesh Venkatasubramanian
bcac6b438e lavf/oggopus: Fixing a log message
Re-wording a log message that's no longer true and changing its
severity level to debug.

Signed-off by: Vignesh Venkatasubramanian <vigneshv@google.com>

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-16 23:46:39 +02:00
Michael Niedermayer
b9e7bde6bd lavf/avienc: use av_freep() avoid stale pointers
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-16 22:49:17 +02:00
Alexandra Khirnova
68b4677420 lavf: Make probe_codec return an error code
This allows handling errors from av_realloc properly.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-16 22:28:23 +03:00
Clément Bœsch
7308439158 lavf: Don't explicitly flush after each written packet in muxers
Since 596e5d4783, this is not necessary anymore. It also allows to
actually disable the flushing, improving write performance (but
possibly giving worse latency in real-time streaming).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-16 22:17:33 +03:00
Luca Barbato
596e5d4783 lavf: Add a flag to enable/disable per-packet flushing
This is enabled by default and can be disabled with
"-fflags -flush_packets".

Inspired by a patch from Nicolas George <nicolas.george@normalesup.org>.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-16 22:11:08 +03:00
Paul B Mahol
c051d668b5 avformat/avidec: use av_calloc() and check for allocation error
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-16 18:53:28 +00:00
Vignesh Venkatasubramanian
23637f98f4 lavf/ogg: Support for end trimming Opus
Adding support for end trimming Opus embedded in Ogg container.

Signed-Off By: Vignesh Venkatasubramanian <vigneshv@google.com>

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-16 21:42:41 +02:00
Luca Barbato
0a9425d7cf flv: Do not export datastream as metadata
It is used internally.
2013-09-16 19:36:37 +02:00
Luca Barbato
92ed83e393 rtmp: Store all the notify messages
The onTextData is used to implement text data streams in flv.
2013-09-16 19:36:37 +02:00
Luca Barbato
fe0337e89b rtmp: Do not send the first field twice within the handshake 2013-09-16 19:36:37 +02:00
Luca Barbato
666ed7eda1 rtmp: Drop an unneeded warning
Apparently a widely used streaming server requires that the second
field always presents a version during C1 phase.
2013-09-16 19:36:37 +02:00
Luca Barbato
ffb7669e47 rtmp: Support play method in listen mode 2013-09-16 19:36:37 +02:00
Luca Barbato
97d35fa89f rtmp: Factor out publish specific code
Will be reused for supporting play.
2013-09-16 19:36:37 +02:00
Paul B Mahol
42b8f5fba1 avformat/segafilm: remove deplanarization hack
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-16 13:30:20 +00:00
Paul B Mahol
ca5456db7f avformat/segafilm: use av_freep()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-16 13:12:45 +00:00
Michael Niedermayer
02f56bfcc3 avformat/sierravmd: use av_freep() for freeing context fields
This ensures that there are no stale pointers

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-16 14:53:56 +02:00
Michael Niedermayer
ff0a382758 Merge commit '5bbfe193a0a41bd2adb648c8c3f6901a575734a2'
* commit '5bbfe193a0a41bd2adb648c8c3f6901a575734a2':
  vocdec: Don't update codec parameters mid-stream

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-16 12:38:56 +02:00
Michael Niedermayer
cfa909ef5b Merge commit '0ef1660a6365ce60ead8858936b6f3f8ea862826'
* commit '0ef1660a6365ce60ead8858936b6f3f8ea862826':
  sierravmd: Do sanity checking of frame sizes

Conflicts:
	libavformat/sierravmd.c

See: 47c4713a23
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-16 12:32:24 +02:00
Michael Niedermayer
a444ddff03 Merge commit '342c43d154e586bc022c86b168fe8d36f69da9d3'
* commit '342c43d154e586bc022c86b168fe8d36f69da9d3':
  omadec: Properly check lengths before incrementing the position

See: f1d6f013b2
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-16 12:15:42 +02:00
Martin Storsjö
5bbfe193a0 vocdec: Don't update codec parameters mid-stream
If we really want to support parameter changes, they need to be
signalled along with the AVPackets as parameter change side data,
not just changing the AVCodecContext parameters when a packet
is demuxed (since there may be other earlier packets yet undecoded).

Something similar was already done for the sample rate in 0883109b2,
but some parameters were left changeable.

This avoids having to recheck the channel count for validity for
each decoded frame in (ad)pcm decoders, unless the decoders
explicitly say that they accept parameter changes.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-16 11:04:52 +03:00
Martin Storsjö
0ef1660a63 sierravmd: Do sanity checking of frame sizes
Limit the size to INT_MAX/2 (for simplicity) to be sure that
size + BYTES_PER_FRAME_RECORD won't overflow.

Also factorize other existing error return paths.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-16 11:04:52 +03:00
Martin Storsjö
342c43d154 omadec: Properly check lengths before incrementing the position
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-16 11:04:52 +03:00
Compn
9ea3598085 riff: g723_1 decodes vivo g723.1 in asf
works on bellair_digital_movie.asf
2013-09-15 22:03:03 -04:00
Alexander Strasser
069010ffae lavf/subtitles: Make comment less arrogant
Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
2013-09-15 22:37:13 +02:00
James Almer
5ab7b3b948 matroskadec: Mute "Unknown entry" log messages for CueRelativePosition entries
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-15 12:57:19 +02:00
James Almer
d59213b5d3 matroskaenc: Bump DocTypeVersion to 4
The muxer has been creating files with v4 elements for some time now,
and especially now that we can mux non-experimental Opus files, reporting
the DocTypeVersion as 2 is not correct.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-15 02:08:15 +02:00
Paul B Mahol
f2afe96181 avformat/nutenc: use av_reallocp_array()
Fixes memleak on allocation error.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-14 16:14:43 +00:00
Paul B Mahol
6a70feadb0 avformat/nutenc: use av_calloc()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-09-14 16:14:43 +00:00
Vignesh Venkatasubramanian
b7bd68853d lavf/matroska: Removing experimental suffix for Opus
Removing the /EXPERIMENTAL suffix for codec id field for Opus. Doing this
as the implementation of embedding Opus in Matroska is complete.

Signed-Off By: Vignesh Venkatasubramanian <vigneshv@google.com>

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-12 23:55:29 +02:00
Michael Niedermayer
e2774b3e3b Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
  Set bits_per_raw_sample when reading j2k frames.
  libopenjpegdec.c: Correctly scale gray16 output if precision < 16
  Use rc_max_rate if no video bit_rate was specified when muxing mxf_d10.
  Store the video bit_rate in the context when muxing mxf.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-12 22:19:46 +02:00
Michael Niedermayer
d2d96f9e47 vformat/smacker: use av_freep() to ensure no stale pointers remain
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-12 16:17:32 +02:00
Michael Niedermayer
ba5e77814e Merge remote-tracking branch 'qatar/master'
* qatar/master:
  matroskaenc: Fix stray pointers left over from av_reallocp_array refactoring

Conflicts:
	libavformat/matroskaenc.c

Mostly not merged as the buggy code was no longer part of FFmpeg

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-12 15:26:06 +02:00