1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-07-17 18:01:38 +02:00
Commit Graph

12289 Commits

Author SHA1 Message Date
Micah Galizia
d4e5d8d4c2 lavf/hls: broker HTTP options
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-01-23 19:27:14 +01:00
Stefano Sabatini
e319725717 lavf/segment: exit immediately in case of invalid stream specifier
Avoid duplicated confusing error message, and propagate error code from
the failing avformat_match_stream_specifier() call.
2013-01-23 18:54:53 +01:00
Stefano Sabatini
bb539eb13a lavf/segment: avoid failure in case -flags +live and -segment_times/frames are specified
The conflict does not apply any longer, since the M3U8 segment target
duration is re-computed every time a new segment is added to the list.
2013-01-23 18:54:33 +01:00
Stefano Sabatini
f4e4e5b841 lavf/segment: drop now pointless segment_list_close() function 2013-01-23 18:32:01 +01:00
Stefano Sabatini
ca68acd7ac lavf/segment: mark #EXT-X-ENDLIST in M3U8 only at the end of stream
Should fix immediate playback termination.

In particular, should fix trac ticket #2172.
2013-01-23 18:32:01 +01:00
Xi Wang
4e692374f7 rtmp: fix buffer overflows in ff_amf_tag_contents()
A negative `size' will bypass FFMIN().  In the subsequent memcpy() call,
`size' will be considered as a large positive value, leading to a buffer
overflow.

Change the type of `size' to unsigned int to avoid buffer overflow, and
simplify overflow checks accordingly.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 05:29:59 +01:00
Xi Wang
902cfe2f74 rtmp: fix multiple broken overflow checks
Sanity checks like `data + size >= data_end || data + size < data' are
broken, because `data + size < data' assumes pointer overflow, which is
undefined behavior in C.  Many compilers such as gcc/clang optimize such
checks away.

Use `size < 0 || size >= data_end - data' instead.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 05:28:38 +01:00
Xi Wang
2f014567cf rtpenc: fix overflow checking in avc_mp4_find_startcode()
The check `start + res < start' is broken since pointer overflow is
undefined behavior in C.  Many compilers such as gcc/clang optimize
away this check.

Use `res > end - start' instead.  Also change `res' to unsigned int
to avoid signed left-shift overflow.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 05:28:01 +01:00
Michael Niedermayer
b89815f519 mvdec: check channel count.
Fixes division by 0

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-22 23:06:49 +01:00
Michael Niedermayer
e6cc3c869b mvdec: minor simplification, remove av_inv_q()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-22 22:52:23 +01:00
Michael Niedermayer
4c9f35bb7c mvdec: use avpriv_set_pts_info() instead of directly setting tb.
Fixes division by 0

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-22 22:41:09 +01:00
Carl Eugen Hoyos
379d03b0c9 Fix compilation with --disable-everything --enable-demuxer=loas 2013-01-22 20:28:31 +01:00
Matthieu Bouron
c114414a57 lavf/aiffenc: ID3 tags support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-22 20:27:05 +01:00
Stefano Sabatini
30a40d4a55 lavf/segment: provide link to HTML M3U8 draft, also fix mentioned version in docs 2013-01-22 20:25:45 +01:00
Michael Niedermayer
9774251c45 rtpenc: do not use random values for seq when bitexact is requested.
Fixes fate

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-22 14:40:18 +01:00
Michael Niedermayer
73b59cc1ba Merge commit '4f56e773fe8a554b8c2662650aaf799c2ece2721'
* commit '4f56e773fe8a554b8c2662650aaf799c2ece2721':
  x86: ac3: Fix HAVE_MMXEXT condition to only refer to external assembly
  rtpenc: Start the sequence numbers from a random offset

Conflicts:
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-22 14:27:48 +01:00
Michael Niedermayer
b4a7f4d018 Merge commit '570a4a0189946c2c983da41d37fdd67fa13266e7'
* commit '570a4a0189946c2c983da41d37fdd67fa13266e7':
  avidec: use sensible error codes instead of -1

Conflicts:
	libavformat/avidec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-22 13:38:20 +01:00
Michael Niedermayer
0a84174f2d mov: prevent double free if the caller replaces the io context.
Fixes Ticket2148

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-22 05:15:47 +01:00
Martin Storsjö
ab587f39b2 rtpenc: Start the sequence numbers from a random offset
Expose the current sequence number via an AVOption - this can
be used both for setting the initial sequence number, or for
querying the current number.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-22 00:25:38 +02:00
Michael Niedermayer
05340be97b img2dec: support seeking in infinitely looped stream
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-21 19:53:41 +01:00
Stefano Sabatini
4630dfd1eb lavf/hlsenc: append last incomplete segment when closing the output
Also introduce missing check on PTS value in case of NOPTS value.
2013-01-21 19:21:21 +01:00
Michael Niedermayer
ed37a566c9 oggdec: remove unused variables
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-21 16:41:50 +01:00
Jindrich Makovicka
570a4a0189 avidec: use sensible error codes instead of -1
Use AVERROR_INVALIDDATA on invalid inputs, and AVERROR_EOF when no more
frames are available in an interleaved AVI.

Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-01-21 16:02:40 +01:00
Michael Niedermayer
2cf9ab6555 Merge commit '8a4f26206d7914eaf2903954ce97cb7686933382'
* commit '8a4f26206d7914eaf2903954ce97cb7686933382':
  dsputil: remove butterflies_float_interleave.
  srtp: Move a variable to a local scope
  srtp: Add tests for the crypto suite with 32/80 bit HMAC

Conflicts:
	libavcodec/x86/dsputil.asm
	libavcodec/x86/dsputil_mmx.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-21 15:18:57 +01:00
Michael Niedermayer
248140f8a2 Merge commit '3ef6d22e1ba544ab37c73e8fc61382f13aac250f'
* commit '3ef6d22e1ba544ab37c73e8fc61382f13aac250f':
  srtp: cosmetics: Use fewer lines for the test vectors
  srtp: Don't require more input data than what actually is needed

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-21 15:07:07 +01:00
Michael Niedermayer
bc639dbd9b Merge commit 'a2a991b2ddf951454ffceb7bcedc9db93e26c610'
* commit 'a2a991b2ddf951454ffceb7bcedc9db93e26c610':
  srtp: Improve the minimum encryption buffer size check
  srtp: Add support for a few DTLS-SRTP related crypto suites

Conflicts:
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-21 15:00:45 +01:00
Michael Niedermayer
acc0c0190b Merge commit 'f53490cc0c809975f8238d5a9edbd26f83bd2f84'
* commit 'f53490cc0c809975f8238d5a9edbd26f83bd2f84':
  rtpdec/srtp: Handle CSRC fields being present
  rtpdec: Check the return value from av_new_packet
  ac3dec: fix non-optimal dithering of zero bit mantissas

Conflicts:
	libavcodec/ac3dec.c
	libavformat/rtpdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-21 14:55:48 +01:00
Michael Niedermayer
0a5da9cc14 Merge commit 'c6f1dc8e4cd967ae056698eafb891a08003c211c'
* commit 'c6f1dc8e4cd967ae056698eafb891a08003c211c':
  rtpdec: Move setting the parsing flags to the actual depacketizers
  rtpdec: Split handling of mpeg12 audio/video to a separate depacketizer

Conflicts:
	libavformat/rtpdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-21 14:02:01 +01:00
Michael Niedermayer
950482bf58 Merge commit '2326558d5277ec87ba6d607a01ec6acfc51c694c'
* commit '2326558d5277ec87ba6d607a01ec6acfc51c694c':
  rtpdec: Split mpegts parsing to a normal depacketizer
  rtpdec: Reorder payload handler registration alphabetically

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-21 13:52:42 +01:00
Michael Niedermayer
c3f3c22563 Merge commit 'a717f9904227d7979473bad40c50eb40af41d01d'
* commit 'a717f9904227d7979473bad40c50eb40af41d01d':
  mpegts: Share the cleanup code between the demuxer and lavf-internal parser functions
  rtpdec_mpeg4: Return one AAC AU per AVPacket
  ppc: Include string.h for memset

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-21 13:45:36 +01:00
Michael Niedermayer
c74d4658dc oggdec: #if 0 disabled code
Fixes CID968589
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-21 03:01:53 +01:00
Micah Galizia
c8ea5ccd5d fix memory leak on string reassign
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Fixes CID968584 and CID968585
2013-01-21 02:50:02 +01:00
Martin Storsjö
c9311f3e46 srtp: Move a variable to a local scope
This simplifies the code slightly.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-21 00:17:00 +02:00
Martin Storsjö
3ef6d22e1b srtp: cosmetics: Use fewer lines for the test vectors
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-21 00:13:43 +02:00
Martin Storsjö
a2a991b2dd srtp: Improve the minimum encryption buffer size check
This clarifies where the limit number comes from, and only
requires exactly as much padding space as will be needed.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-21 00:13:43 +02:00
Martin Storsjö
ae01e8d295 srtp: Add tests for the crypto suite with 32/80 bit HMAC
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-21 00:13:43 +02:00
Martin Storsjö
b4bb1d493c srtp: Don't require more input data than what actually is needed
The theoretical minimum for a (not totally well formed) RTCP packet
is 8 bytes, so we shouldn't require 12 bytes as minimum input.

Also return AVERROR_INVALIDDATA instead of 0 if something that is
not a proper packet is given.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-21 00:13:43 +02:00
Martin Storsjö
e1d0b3d875 srtp: Add support for a few DTLS-SRTP related crypto suites
The main difference to the existing suites from RFC 4568 is
that the version with a 32 bit HMAC still uses 80 bit HMAC
for RTCP packets.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-21 00:13:35 +02:00
Martin Storsjö
f53490cc0c rtpdec/srtp: Handle CSRC fields being present
This is untested in practice, but follows the spec.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-21 00:10:47 +02:00
Martin Storsjö
a76bc3bc44 rtpdec: Check the return value from av_new_packet
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-21 00:08:19 +02:00
Xi Wang
64b7e7dcaf cafdec: fix overflow checking in read_header()
Several compilers such as clang/icc/pathscale will optimize the check
pos + size < pos (assuming size > 0) into false, since signed integer
overflow is undefined behavior in C.  This breaks overflow checking.
Use a safe precondition check instead.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-20 21:30:34 +01:00
Michael Niedermayer
3317414fc1 wtvdec: fix integer overflow
Fixes CID968583
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-20 20:59:30 +01:00
Michael Niedermayer
7cb27d216d oggdec: Support chained streams, support replacing streams in multistream files.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Conflicts:

	Changelog
2013-01-20 17:53:51 +01:00
Martin Storsjö
c6f1dc8e4c rtpdec: Move setting the parsing flags to the actual depacketizers
This gets rid of almost all the codec specific details from the
generic rtpdec code.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-20 18:20:42 +02:00
Martin Storsjö
a9c847c1ba rtpdec: Split handling of mpeg12 audio/video to a separate depacketizer
This also adds checking of mallocs.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-20 18:20:22 +02:00
Martin Storsjö
2326558d52 rtpdec: Split mpegts parsing to a normal depacketizer
This gets rid of a number of special cases from the common rtpdec
code.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-20 18:17:17 +02:00
Martin Storsjö
d5bb8cc2dd rtpdec: Reorder payload handler registration alphabetically
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-20 18:16:04 +02:00
Martin Storsjö
a717f99042 mpegts: Share the cleanup code between the demuxer and lavf-internal parser functions
The lavf-internal parser functions are used when receiving
mpegts over RTP. This fixes memory leaks in this setup.

The normal mpegts demuxer close function was updated in ec7d0d2e in
2004 to fix leaks, but the parsing function used for RTP wasn't
updated and has been leaking ever since.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-20 18:14:17 +02:00
Martin Storsjö
21f5c24b80 rtpdec_mpeg4: Return one AAC AU per AVPacket
This makes the returned data valid to stream copy into other
containers as well, not only for decoding straight away.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-20 18:12:38 +02:00
Matthieu Bouron
b3b456b258 lavf/id3v2: seek back to previous offset if header size is not matched
Makes ff_id3v2_read reset stream position at the end of ID3 data if the
header size is not matched (caused by an EOF for example).

Current behaviour (without the patch):
    filesize = 400
    id3 data size = 399
    file offset after ff_id3v2_read is 400 instead of 399

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-20 04:39:56 +01:00