1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-16 03:44:15 +02:00
Commit Graph

82878 Commits

Author SHA1 Message Date
Rostislav Pehlivanov
38a1315582 opus: remove redundant ff_celt_window2 declaration
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-12-18 07:11:27 +00:00
Ståle Kristoffersen
d8b9bef1a0 avformat: Auto-detect mjpeg 2000 in mpeg-ts
This makes it possible to decode motion jpeg 2000
encoded in a transport stream without a correct PMT/PAT.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-17 23:52:25 +01:00
Jay Ridgeway
295601bba3 avformat/tls: add tls url_get_file_handle
Support url_get_file_handle on TLS streams.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-17 19:46:30 +01:00
Pavel Koshevoy
6b517a194d lavc: Fix ticket 6024, truncated mode decoding
The assumption that avcodec_send_packet makes regarding decoders
consuming the entire packet is not true if the codec supports
truncated decoding mode and the truncated flag is turned on.

Steps to reproduce:
./ffmpeg_g -flags truncated \
-i "http://samples.ffmpeg.org/MPEG2/test-ebu-422.40000.pakets.ts" \
-c:v ffv1 -c:a copy -y /tmp/truncated.nut

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-17 18:41:18 +01:00
Zhou Xiaoyong
5b74ebe937 avcodec/mips: version 1 of vc1dsp optimizations for loongson mmi
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-17 18:41:18 +01:00
Paul B Mahol
334fad3645 avfilter/vf_ssim: add >8 bit depth suppport
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-12-17 16:33:16 +01:00
Mark Harris
a5cf600ccb avformat/wavdec: Eliminate goto for clang -O0 DCE
Clang is not able to eliminate the reference to ff_spdif_probe() when
there is a goto target in the same block and optimization is disabled.

This fixes the following build failure on OS X:
  ./configure --disable-everything --disable-doc \
    --enable-decoder=pcm_s16le --enable-demuxer=wav \
    --enable-protocol=file --disable-optimizations --cc=clang
  make
  ...
  Undefined symbols for architecture x86_64:
    "_ff_spdif_probe", referenced from:
        _set_spdif in libavformat.a(wavdec.o)
  ld: symbol(s) not found for architecture x86_64

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-16 03:00:03 +01:00
Michael Niedermayer
d4c1cc2b87 avutil/imgutils: Clarify doxy for av_image_check_size2()
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-16 02:07:32 +01:00
Martin Vignali
6672a49e5a fate/psd: add tests for uncompress and rle samples
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-16 02:07:20 +01:00
Michael Niedermayer
eb7aa6bde4 avcodec/h263dec: Return the correct error code in explode mode
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-15 22:13:17 +01:00
Michael Niedermayer
c869e00f88 avcodec/smvjpegdec: return the packet size instead of 0
Most decoders return the amount of data used.
This is more consistent

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-15 22:12:48 +01:00
Michael Niedermayer
0888c5a242 avcodec/tdsc: return the packet size instead of 0
Most decoders return the amount of data used.
This is more consistent

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-15 22:12:12 +01:00
Michael Niedermayer
2eebcda10a avcodec/screenpresso: return the packet size instead of 0
Most decoders return the amount of data used.
This is more consistent

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-15 22:11:26 +01:00
Michael Niedermayer
c62beba49a avcodec/rscc: return the packet size instead of 0
Most decoders return the amount of data used.
This is more consistent

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-15 22:10:40 +01:00
Paul B Mahol
745f4bcc2c avfilter/vsrc_testsrc: draw_bar: make sure width is not negative
Reported-by: Josh de Kock
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-12-15 16:03:48 +01:00
Chris Cunningham
ab87df9a47 avformat/mp3dec: fix msan warning when verifying mpa header
MPEG Audio frame header must be 4 bytes. If we fail to read
4 bytes bail early to avoid Use-of-uninitialized-value msan error.
Reference https://crbug.com/666874.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-15 04:36:28 +01:00
Andreas Cadhalpun
ed412d2850 tiff: fix overflows when calling av_reduce
The arguments of av_reduce are signed, so the cast to uint64_t is misleading.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-12-15 01:30:57 +01:00
Andreas Cadhalpun
076c3a9fa2 mov: prevent overflow during bit rate calculation
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-12-15 01:25:50 +01:00
Andreas Cadhalpun
baba9c6aef cafdec: prevent overflow during bit rate calculation
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-12-15 01:25:43 +01:00
Andreas Cadhalpun
e558a6348a 4xm: prevent overflow during bit rate calculation
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-12-15 01:25:34 +01:00
Paul B Mahol
e54b61a9ce doc/filters: fix channel names in sofalizer example
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-12-14 22:48:53 +01:00
Paul B Mahol
458fbee221 avfilter/af_sofalizer: warn if user gives unknown channel names
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-12-14 22:47:38 +01:00
Andrey Utkin
c4afd4abce doc/filters: drawtext: add example of printing texts on same baseline
Height of canvas produced by drawtext varies depending on symbols in
text, so add example for printing separate texts aligned horizontally.

Wording suggested by Lou Logan <lou@lrcd.com>

Signed-off-by: Andrey Utkin <andrey.utkin@pb.com>
Signed-off-by: Lou Logan <lou@lrcd.com>
2016-12-14 09:38:11 -09:00
Diego Biurrun
2d7aadf3d9 Add missing #includes for standalone spherical-information-related headers
(cherry picked from commit f912fd767e)
Signed-off-by: James Almer <jamrial@gmail.com>
2016-12-14 13:33:30 -03:00
Michael Niedermayer
457e933919 Bump for psd demuxer and decoder
Found-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-14 11:43:33 +01:00
Martin Vignali
a534862b27 libavformat : add Photoshop PSD demuxer.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-14 03:21:27 +01:00
Martin Vignali
90af962911 libavcodec : add decoder for Photoshop PSD image files
Decode the Image Data Section (which contains merged pictures).
Support RGB/A and Grayscale/A in 8bits and 16 bits per channel.
Support uncompress and rle decompression in Image Data Section.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-14 03:21:27 +01:00
Andreas Cadhalpun
ad5807f8aa avformat: fix overflows during bit rate calculation
The bit_rate field has type int64_t since commit
7404f3bdb9.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-12-14 01:06:55 +01:00
Muhammad Faiz
2b0112d42d swresample/resample: remove swri_resample function
integrate it inside multiple_resample
allow some calculations to be performed outside loop

Suggested-by: Michael Niedermayer <michael@niedermayer.cc>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2016-12-14 06:48:34 +07:00
Alex Converse
bf15981b12 libvpxenc: Don't spam level errors for VP8 encodes
Fixes "Failed to set VP9E_GET_LEVEL codec control: Codec does not
implement requested capability" log messages on VP8 encodes.
2016-12-13 10:43:57 -08:00
Muhammad Faiz
6a8c0d8357 swresample/resample: do not allow negative dst_size return value
This should fix Ticket6012

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
2016-12-14 00:43:44 +07:00
Michael Niedermayer
f0bdd53871 avformat/utils: Print verbose error message if stream count exceeds max_streams
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-13 15:55:42 +01:00
Michael Niedermayer
30581c51e7 avformat/options_table: Set the default maximum number of streams to 1000
Fixes CVE-2016-9561, Note the security relevance of this is disputed as
running out of memory can happen with valid files

Suggested-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-13 15:55:42 +01:00
Marton Balint
265d45183b avfilter/avfilter: fix filtering frames with unknown channel layouts for filters needing writable frames
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-12-13 09:57:10 +01:00
Zhou Xiaoyong
d84e635d06 avcodec/mips: version 1 of wmv2dsp optimizations for loongson mmi
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-13 03:47:04 +01:00
Zhou Xiaoyong
c5c6e30781 avcodec/mips: version 1 of vp8dsp optimizations for loongson mmi
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-13 03:47:04 +01:00
Wan-Teh Chang
3f55752cd5 configure: add -fPIE instead of -pie to C flags for ThreadSanitizer
-pie was added to C flags for ThreadSanitizer in commit
19f251a288. Under clang 3.8.0, the -pie
flag causes a compiler warning and a linker error when running configure
--toolchain=clang-tsan. Here is an excerpt from config.log:

clang ... -fsanitize=thread -pie -std=c11 -fomit-frame-pointer -pthread -c -o /tmp/ffconf.hL61stP9.o /tmp/ffconf.YO6ZaSFG.c
clang: warning: argument unused during compilation: '-pie'
clang -fsanitize=thread -pie -Wl,--as-needed -Wl,-z,noexecstack -o /tmp/ffconf.W5c2e41l /tmp/ffconf.hL61stP9.o -lbz2 -pthread
/usr/bin/ld: /tmp/ffconf.hL61stP9.o: relocation R_X86_64_PC32 against undefined symbol `atan2f@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
clang: error: linker command failed with exit code 1 (use -v to see invocation)

To be conservative, I changed -pie to -fPIE. But the documentation seems
to imply just -fsanitize=thread is enough:

http://clang.llvm.org/docs/ThreadSanitizer.html
https://github.com/google/sanitizers/wiki/ThreadSanitizerCppManual

Signed-off-by: Wan-Teh Chang <wtc@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-13 00:41:39 +01:00
Wan-Teh Chang
fed50c4304 avutil: fix data race in av_get_cpu_flags()
Make the one-time initialization in av_get_cpu_flags() thread-safe. The
static variable |cpu_flags| in libavutil/cpu.c is read and written using
normal load and store operations. These are considered as data races.
The fix is to use atomic load and store operations.

The fix can be verified by running the libavutil/tests/cpu_init.c test
program under ThreadSanitizer:
    ./configure --toolchain=clang-tsan
    make libavutil/tests/cpu_init
    libavutil/tests/cpu_init

There should be no warnings from ThreadSanitizer.

Co-author: Dmitry Vyukov of Google, who suggested the data race fix.

Signed-off-by: Wan-Teh Chang <wtc@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-13 00:07:20 +01:00
Michael Niedermayer
4cf3def805 avutil/tests/imgutils: Remove unused variable
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-13 00:06:53 +01:00
Andreas Cadhalpun
3ab8436ff6 opt: reject denominator zero as out of range
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-12-13 00:00:31 +01:00
Derek Buitenhuis
b7e4ea0c80 fate: Add h264 test for frame num gaps
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-12-12 13:33:52 +00:00
Timo Rothenpieler
00223132e9 avcodec/cuvid: fix compilation with msvc11 2016-12-12 13:09:55 +01:00
Carl Eugen Hoyos
62eafc6a6d lavf/mov: Accept multiple fourcc for AVID 1:1.
Fixes ticket #5982.
2016-12-12 12:26:21 +01:00
Carl Eugen Hoyos
9d068896d3 lavf/isom: Support EVRC in pvAuthor files.
Fixes ticket #6014.
2016-12-12 11:37:06 +01:00
James Almer
edb4f5da81 avformat/matroskadec: remove the strict unofficial check for Colour elements
Signed-off-by: James Almer <jamrial@gmail.com>
2016-12-10 21:06:45 -03:00
James Almer
4e759072c2 avformat/matroskadec: allocate Colour related fields only if the file contains the relevant master
The demuxer doesn't fill the defaults if the master isn't present.
This results in codecpar->color_space being set with a value of
zero (RGB) on such files.

Signed-off-by: James Almer <jamrial@gmail.com>
2016-12-10 21:05:21 -03:00
Marton Balint
1f3910262e ffplay: fix sws_scale possible out of bounds array access
As I used simple RGBA formats for subtitles and for the video texture if
avfilter is disabled I kind of assumed that sws_scale won't access data
pointers and strides above index 0, but apparently that is not the case.

Fixes Coverity CID 1396737, 1396738, 1396739, 1396740.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-12-10 23:22:11 +01:00
Wan-Teh Chang
3703f13333 avutil/tests: run the cpu_init.c test conditionally on HAVE_THREADS
Suggested by Diego Biurrun and James Almer.

Signed-off-by: Wan-Teh Chang <wtc@google.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-12-10 18:47:10 -03:00
Wan-Teh Chang
8986885801 avutil/cpu_init: remove unnecessary arguments to the main() function
Signed-off-by: James Almer <jamrial@gmail.com>
2016-12-10 18:47:00 -03:00
Michael Niedermayer
2f07830e69 avcodec: Add max_pixels options
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-10 22:24:10 +01:00