Commit Graph

18613 Commits

Author SHA1 Message Date
Derek Buitenhuis
21f9468402 avutil: Rename FF_CEIL_COMPAT to AV_CEIL_COMPAT
Libav, for some reason, merged this as a public API function. This will
aid in future merges.

A define is left for backwards compat, just in case some person
used it, since it is in a public header.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-01-27 16:36:46 +00:00
Matt Oliver
b66ac803fa avformat/mux: Fix error when writing uncoded frames.
commit "avpacket: Deprecate av_dup_packet" broke the use
av_interleaved_write_uncoded_frame as any input uncoded frame has an
invalid packet size that will crash when av_packet_ref tries to allocate
'size' new memory. Since the packet is a temporary created within mux.c
itself it can be used directly without needing a new ref.

Signed-off-by: Matt Oliver <protogonoi@gmail.com>
2016-01-27 17:16:43 +11:00
Paul B Mahol
e9e623369d avcodec: add Ulead DV audio decoder
Fixes #1564.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-01-26 23:14:40 +01:00
Ivan
a0174f6729 avformat/flvenc: copyts in FLV muxer
The purpose of this patch is to preserve timestamps when using ffmpeg for publishing RTMP streams, e.g. ffmpeg -i rtmp://source/stream -f flv rtmp://target/stream.
There is a setting "copyts" for that purpose. Unfortunately it doesn't work with FLV muxer because it has its own timestamp correction which makes global setting "copyts" ineffective.

This patch removes timestamp correction in FLV muxer. This means FLV will rely on ffmpeg timestamp correction which makes it possible to use copyts.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-26 20:56:55 +01:00
Vittorio Gambaletta (VittGam)
8b02af1e6f avformat/mpegtsenc: Fix multi program so that it supports adding the same stream to multiple programs.
Signed-off-by: Vittorio Gambaletta <ffmpeg-dev@vittgam.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-25 19:47:16 +01:00
Michael Niedermayer
cde57eee98 avformat/hls: Check that filename is not "" in probe before checking its extension
Possibly the check as a whole causes more problems than it helps, if so dont
hesitate to remove it

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-25 00:18:57 +01:00
Kieran Kunhya
2d40a09b6e avformat: Remove support for libquvi
libquvi has not been updated since 2013.
It also has a number of security issues.
2016-01-24 16:01:04 +00:00
Michael Niedermayer
a7305c780b Print the whitelists if entities are not found on them
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-24 16:52:10 +01:00
Michael Niedermayer
3130556c0e avformat: Document urls a bit
Spell-checked-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-24 16:52:10 +01:00
Michael Niedermayer
15cc98a0f3 avformat/libquvi: Set default demuxer and protocol limitations
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-23 00:12:54 +01:00
Michael Niedermayer
8e32d01432 avformat/concat: Check protocol prefix
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-23 00:12:54 +01:00
Perette Barella
84110f4f77 libavformat/tcp.c : add send_buffer_size and recv_buffer_size options
adds two new options that may be set via the dictionary:

- send_buffer_size
- recv_buffer_size

When present, setsockopt() is used with SO_SNDBUF and SO_RCVBUF to set
socket buffer sizes.  I chose to make send and receive independent
because buffering requirements are often asymmetric.

Errors in setting the buffer size mean the socket will use its
default, so they are ignored.

There is no sanity checking on values, as the kernel/socket layers
already impose reasonable limits if asked for something crazy.

Rationale for enlarging receive buffers is to reduce susceptibility
to intermittent network delays/congestion.  I added setting the send
buffer for symmetry.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-22 15:36:30 +01:00
Michael Niedermayer
56c182c4d7 avformat/nutenc: implement deinit()
Should prevent some leaks if header writing fails

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-21 13:16:24 +01:00
Carl Eugen Hoyos
4f9314ed58 lavf/riff: Support reading vlc's rawvideo fourccs.
Reported by Bob, no6b no6b com
2016-01-21 03:38:33 +01:00
Carl Eugen Hoyos
7158ce778f lavf/nut: Add forgotten fourccs for YUV4xxP9. 2016-01-21 03:35:49 +01:00
Michael Niedermayer
41e07390e0 avformat/avformat: Replace some references to filenames by urls
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-21 02:57:10 +01:00
Michael Niedermayer
b750b67d13 avformat/img2dec: Use AVOpenCallback
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-20 21:21:31 +01:00
Michael Niedermayer
984d58a344 avformat/avio: Limit url option parsing to the documented cases
This feature is not know much or used much AFAIK, and it might be helpfull in
exploits.
No specific case is known where it can be used in an exploit though
subsequent commits depend on this commit though

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-20 21:21:31 +01:00
Michael Niedermayer
7ccedc1c78 avformat/img2dec: do not interpret the filename by default if a IO context has been opened
With this, user applications which use custom IO and have set a IO context will not have
their already opened IO context ignored and glob/seq being interpreted

Comments and tests from maintainers of user apps are welcome!

Liked-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-20 17:31:01 +01:00
Derek Buitenhuis
712d962a6a mov: Add an option to toggle dref opening
This feature is mostly only used by NLE software, and is
both of dubious value being enabled by default, and a
possible security risk.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-20 15:41:58 +01:00
Michael Niedermayer
b0c57206d5 avformat/hls: Require the file extension to be m3u / m3u8 for probing to succeed
If the filename isnt set by the user application then the code behaves like before

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-19 16:46:30 +01:00
Mats Peterson
d6b3062b5a lavf/qtpalette: Fix incorrect palettes
This patch corrects the colors of the 2 and 4 bpp palettes.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-19 11:18:32 +01:00
Carl Eugen Hoyos
9cf8c3e62c ape: Show more information for loglevel verbose.
Requested by Andy E, fixes bug 687.
2016-01-19 11:02:14 +01:00
Hendrik Leppkes
e816fe7401 Merge commit '7570c9e04f010c9b3bfdeb4338d330f2cdd25278'
* commit '7570c9e04f010c9b3bfdeb4338d330f2cdd25278':
  swfdec: support compressed swf

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-19 08:58:55 +01:00
Hendrik Leppkes
be3963c8af Merge commit '066281372d90d63ca021b659abcb8faefd6bc4a6'
* commit '066281372d90d63ca021b659abcb8faefd6bc4a6':
  asfdec: Remove unused function parameters

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-19 08:47:48 +01:00
Carl Eugen Hoyos
9bc281beae lavf/icodec: Improve autodetection.
Avoids misdetection of MPEG (B-)frames.

Reviewed-by: Michael Bradshaw
2016-01-18 00:36:44 +01:00
Eddie Hao
a6dc1eb837 remove all uses of the deprecated avpicture_get_size() function
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-17 12:01:35 +01:00
Mats Peterson
535d09a510 lavf/matroskadec: Get sample size from private data
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-16 11:44:46 +01:00
Mats Peterson
a51c8a68ad lavf/mov: Don't limit fourcc 0 -> raw/twos to version 0 sample descriptions
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-16 11:42:46 +01:00
Piotr Bandurski
eded2e4fac avformat/riff: add C210 FourCC (Canopus C210) 2016-01-15 19:22:51 +01:00
Piotr Bandurski
23ac355487 avformat/riff: add YUYV FourCC (Drastic YUYV) 2016-01-15 19:14:51 +01:00
Michael Niedermayer
cfda1bea4c avformat/hls: Even stricter URL checks
This fixes a null pointer dereference at least

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-15 15:29:22 +01:00
Michael Niedermayer
6ba42b6482 avformat/hls: More strict url checks
No case is known where these are needed

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-15 14:11:21 +01:00
James Almer
e3c188e72c avcodec/rmdec: add missing av_log argument
Also change the format specifier to expect an unsigned int

Signed-off-by: James Almer <jamrial@gmail.com>
2016-01-15 02:26:36 -03:00
Mats Peterson
b58cfa616c lavf/mov: Confine 0x00000000 to raw/twos fourcc mapping to version 0 sample descriptions
Confine the 0x00000000 to 'raw '/'twos' fourcc mapping to old version 0
sound sample descriptions, since they are the only valid sample
descriptions for this type of mapping.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-15 03:38:43 +01:00
Andreas Cadhalpun
c29e87ad55 asfdec_o: check for too small size in asf_read_unknown
This fixes infinite loops due to seeking back.

Reviewed-by: Alexandra Hájková <alexandra.khirnova@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-15 00:40:21 +01:00
Andreas Cadhalpun
0e32153e9c asfdec_o: break if EOF is reached after asf_read_packet_header
asf_read_payload can unset eof_reached, so check it also before calling
that function.

This fixes infinite loops.

Reviewed-by: Alexandra Hájková <alexandra.khirnova@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-15 00:39:46 +01:00
Andreas Cadhalpun
3776a72962 asfdec_o: make sure packet_size is non-zero before seeking
This fixes infinite loops due to seeking back.

Reviewed-by: Alexandra Hájková <alexandra.khirnova@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-15 00:39:30 +01:00
Andreas Cadhalpun
74474750f1 asfdec_o: prevent overflow causing seekback
This fixes infinite loops.

Reviewed-by: Alexandra Hájková <alexandra.khirnova@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-15 00:38:50 +01:00
Andreas Cadhalpun
0002d845e8 asfdec_o: check avio_skip in asf_read_simple_index
The loop can be very long, even though the file is very short.

Reviewed-by: Alexandra Hájková <alexandra.khirnova@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-15 00:37:30 +01:00
Andreas Cadhalpun
aa18016996 asfdec_o: reject size > INT64_MAX in asf_read_unknown
Both avio_skip and detect_unknown_subobject use int64_t for the size
parameter.

This fixes a segmentation fault due to infinite recursion.

Reviewed-by: Alexandra Hájková <alexandra.khirnova@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-15 00:37:13 +01:00
Andreas Cadhalpun
763c572801 asfdec_o: only set asf_pkt->data_size after sanity checks
Otherwise invalid values are used unchecked in the next run.
This can cause NULL pointer dereferencing.

Reviewed-by: Alexandra Hájková <alexandra.khirnova@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-01-15 00:36:41 +01:00
Michael Niedermayer
c3a24006d5 avformat/rmdec: Fix Packet memleak at close()
Fixes: asan_heap-oob_445b39_1741_d00eb645ab48eb2203b4a04a5b997103.ivr

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-14 23:49:52 +01:00
Michael Niedermayer
80fd348bb7 avformat/rmdec: Check size in ivr_read_packet() before use
Fixes out of array access
Fixes: asan_heap-oob_445b39_1741_d00eb645ab48eb2203b4a04a5b997103.ivr

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-14 23:49:52 +01:00
Maxim Andreev
7145e80b4f avformat/hls: forbid all protocols except http(s) & file
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-14 00:18:00 +01:00
Michael Niedermayer
115fb6d03e avformat/aviobuf: Fix end check in put_str16()
Fixes out of array read
Fixes: 03c406ec9530e594a074ce2979f8a1f0/asan_heap-oob_7dec26_4664_37c52495b2870a2eaac65f53958e76c1.flac

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-13 03:09:08 +01:00
Carl Eugen Hoyos
405abdbaee lavf/mpjpegdec: Do not call av_log() while probing. 2016-01-12 20:35:03 +01:00
Michael Niedermayer
7c0b84d899 avformat/asfenc: Check pts
Fixes integer overflow
Fixes: 0063df8be3aaa30dd6d76f59c8f818c8/signal_sigsegv_7b7b59_3634_bf418b6822bbfa68734411d96b667be3.mov

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-12 19:57:14 +01:00
Michael Niedermayer
d73f0c586e avformat/asfenc: Flush packet before duration becomes unrepresentable
Fixes: 0063df8be3aaa30dd6d76f59c8f818c8/signal_sigsegv_7b7b59_3634_bf418b6822bbfa68734411d96b667be3.mov
Fixes assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-12 19:30:22 +01:00
Mats Peterson
adef8ee794 lavf/matroskadec: Use av_realloc() in get_qt_codec()
Use av_realloc() rather than av_malloc() when normalizing noncompliant
private data in get_qt_codec().

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-01-12 14:53:25 +01:00