Commit Graph

78781 Commits

Author SHA1 Message Date
Derek Buitenhuis 1c9215e580 lavf/mp3: Properly check return values of seeks and reads while reading the header
Fixes large amounts of seeking past EOF, which could be extremely
slow over a network.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-28 13:57:35 +00:00
Roman Ryltsov af2568a675 avformat/Makefile: Fixed missing rawutils.o reference (required by movenc.c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-28 14:43:52 +01:00
Reimar Döffinger 4dd4d53531 Document and validate AVFrame plane pointers.
Check that the required plane pointers and only
those are set up.
Currently does not enforce anything for the palette
pointer of pseudopal formats as I am unsure about the
requirements.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2016-02-28 13:33:14 +01:00
Reimar Döffinger 45fa03b1f9 mjpegdec: Do not assume unused plane pointer are NULL.
We do neither document nor check such a requirement
and for application-provided get_buffer2 they could
contain the result of a malloc(0) or whatever value
they had previously.
This fixes a use-after-free in e.g. MPlayer:
https://trac.mplayerhq.hu/ticket/2262
We might want to consider changing the (documented)
API in addition though.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2016-02-28 13:32:01 +01:00
Reimar Döffinger 0f199f0ad0 mss2: Fix buffer overflow.
Reported as https://trac.mplayerhq.hu/ticket/2264 but have
not been able to reproduce with FFmpeg-only.
I have no idea what coded_height is used for here exactly,
so this might not be the best fix.
Fixes the following chain of events:
ff_mss12_decode_init sets coded_height while not setting height.
ff_mpv_decode_init then copies coded_height into MpegEncContext height.
This is then used by init_context_frame to allocate the data structures.
However the wmv9rects are validated/initialized based on avctx->height, not
avctx->coded_height.
Thus the decode_wmv9 function will try to decode a larger video that we
allocated data structures for, causing out-of-bounds writes.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2016-02-28 13:32:01 +01:00
Michael Niedermayer 5d18dc3795 tests/lavf-regression: Add mp4 timecode test
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-28 03:54:50 +01:00
Syed Andaleeb Roomy b4dcd351ec movenc: Timecode in MP4 Although MP4 does not have a concrete specification to store timecode information, the following technical note from Apple describes a way to achieve this via timecode track, similar to how it is done for MOV files.
https://developer.apple.com/library/mac/technotes/tn2174/_index.html

- Enabled creation of timecode tracks for MP4 in the same way as MOV.
- Used nmhd as media information header of timecode track of MP4 instead
  of gmhd used in MOV, thus avoiding tcmi also, as recommended above.
- Bypassed adding source reference field for MP4, as suggested above.

Issue: https://trac.ffmpeg.org/ticket/4704

Signed-off-by: Syed Andaleeb Roomy <andaleebcse@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-28 03:47:23 +01:00
Andreas Cadhalpun 15708f1347 configure: add direct detection of libopencv
The pkg-config file contains all opencv libraries, not only the
neccessary ones.

This change makes it possible to use the libopencv-imgproc-dev Debian
package instead of libopencv-dev, saving about 200 MB of useless
build-dependencies.

In particular one doesn't need to install the parts of opencv that
depend on ffmpeg libraries.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-28 02:47:12 +01:00
Michael Niedermayer b70e9b4906 avutil/imgutils: Assert that the 2nd av_image_fill_linesizes() call in av_image_fill_linesizes() still succeeds
Fixes CID1271742

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-28 02:02:50 +01:00
Rodger Combs f0ea536c47 lavc/aac_ac3_parser: reindent 2016-02-27 16:31:46 -06:00
Rodger Combs 9f5baf9085 lavc/aac_ac3_parser: avoid zeroing codec parameters if we haven't read a frame
This caused issues when seeking in some unusual MPEGTS files
2016-02-27 16:31:46 -06:00
Rodger Combs a21a3c25dc probe TrueHD in MPEGTS 2016-02-27 16:27:27 -06:00
Rodger Combs b426d66370 lavc/Makefile: dnxhd demuxer depends on dnxhddata.o 2016-02-27 16:26:18 -06:00
wm4 5d2c5e8bff vf_copy: exclude hwaccel formats
This does obviously not work.

(Additions based on vf_crop.c.)
2016-02-27 21:35:20 +01:00
Paul B Mahol e266d29978 avfilter/avf_showwolume: add orientation and step option
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-02-27 17:45:20 +01:00
Clément Bœsch 653af9f188 lavfi/ass: fix version check for sub_text_format option 2016-02-27 16:26:10 +01:00
Kieran Kunhya 8adbe26b90 avcodec/cfhd: Add support for 12-bit RGBA.
Plays all known samples
2016-02-27 13:17:20 +00:00
Kieran Kunhya 0096453f70 cfhd: reallocate internal buffers on format change.
Fixes some, but not all, of the threading fuzz crashes
2016-02-27 12:18:06 +00:00
Michael Niedermayer d39b770aa2 avcodec/utils: Check that the video data[] arrays are NULL on the input to get_buffer_internal()
This should return an error to the decoder if the struct it tried to getbuffer is dirty

Reviewed-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-27 13:11:52 +01:00
Michael Niedermayer bdf7093bd0 avcodec/utils: Check all data[] pointers in video_get_buffer() not just the first
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-27 13:11:52 +01:00
Clément Bœsch 1e7a37f0a0 sws/yuv2rgb: clarify precision of coeff and offset for mmx code
It makes easier looking at the difference with the generic code just
below.
2016-02-27 11:13:26 +01:00
Clément Bœsch f9987464cf sws/yuv2rgb: avoid a few ub on signed left shifts 2016-02-27 11:13:26 +01:00
Vicente Olivert Riera 5156578d1f mips: do not disable any feature for generic cores
We don't know which features are available when the user selects a
generic core, so don't disable anything by default and let the user
decide.

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-27 04:22:56 +01:00
Vicente Olivert Riera 8514fb6b98 mips: improve detection of ISAs, FPU and ASEs (DSP, MSA)
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-27 04:22:55 +01:00
Mats Peterson 6aac43f180 lavf/matroskadec: Process QuickTime palette per track
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-27 02:03:02 +01:00
Mats Peterson 9a27780821 lavf/movenc: Add palette to video sample description
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-27 01:28:48 +01:00
Paul B Mahol 42c5e1cc2a avfilter: add datascope filter
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-02-26 22:22:05 +01:00
Clément Bœsch b5451d88cf lavc: reindent a few decoders after previous commits 2016-02-26 22:15:20 +01:00
Clément Bœsch 22ebbda637 lavc: deprecate decoded ass subtitles with timings 2016-02-26 21:53:34 +01:00
Clément Bœsch fa2df3a401 lavfi/ass: use ass_process_chunk() instead of ass_process_data() 2016-02-26 21:53:34 +01:00
Clément Bœsch 6433618dc0 ffmpeg: set sub_text_format to ass (without timing) by default
Fixes Ticket #4783
2016-02-26 21:53:34 +01:00
Clément Bœsch 30e7685360 lavc/options: add ass_ro_flush_noop to flags2 2016-02-26 21:53:32 +01:00
Clément Bœsch 2941282124 lavc: allow subtitle text format to be ASS without timing 2016-02-26 21:49:34 +01:00
Clément Bœsch 805685fffd Kill timed SSA 2016-02-26 21:34:33 +01:00
Michael Niedermayer 7a8ab57cf1 fate: Add test for packed mp3 in mp4 demuxing
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-26 20:12:53 +01:00
Michael Niedermayer 410f717ff6 avcodec/utils: Merge identical if conditions
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-02-26 20:12:30 +01:00
Rostislav Pehlivanov bc7beb6574 vc2enc: calculate the minimum slice size only once
This commit moves the minimum bits per slice calculations outside of the
rate control function as it is identical for every slice.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-02-26 15:38:26 +00:00
Rostislav Pehlivanov 2b811e4605 vc2enc: halve allocated table size, refactor and optimize quantization
Since coefficients differ only in the last bit when writing to the
bitstream it was possible to remove the sign from the tables, thus
halving them. Also now all quantization is done in the unsigned domain
as the sign is completely separate, which gets rid of the need to do
quantization on 32 bit signed integers.

Overall, this slightly speeds up the encoder depending on the machine.
The commit still generates bit-identical files as before the commit.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-02-26 14:47:06 +00:00
Rostislav Pehlivanov 7db2e757c5 vc2enc: use FFABS() instead of abs()
Provides a minor speedup.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-02-26 12:55:34 +00:00
Rostislav Pehlivanov 3ef10406e1 vc2enc: correctly zero out coefficient array padding
Credit for figuring this out goes to James Darnley.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-02-26 12:21:36 +00:00
Rostislav Pehlivanov 35346c7b0f vc2enc: mark as FF_CODEC_CAP_INIT_THREADSAFE and align AVCodec entries
The encoder does not modify any global variables.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2016-02-26 12:17:42 +00:00
Paul B Mahol 2a7f056d88 avfilter/af_astats: do not clear previous sample value
Should help when using reset=1 and metadata=1

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-02-26 11:12:45 +01:00
Stefano Sabatini dedcb3c5a5 lavf/mux: do not fail in case of non strictly monotonically increasing DTS values for data packets
Consistent with what we already do with subtitles since ac08c5c0ad.
2016-02-26 10:18:09 +01:00
Carl Eugen Hoyos 07eec5e721 lavf/img2dec: Skip SOF size when probing jpeg.
Fixes auto-detection for some resolutions.
Reported-by: Clément Bœsch
2016-02-26 09:53:29 +01:00
Matthieu Bouron 885a6d8324 configure: only check dispatch header on darwin
Fixes build of lavd/jack on linux if dispatch happens to be available on
this platform. dispatch, as well as its dependencies kqueue and pwq are
generally not installed / distribued on linux systems. If it happens to
be the case, you want to explicitely link against the libraries (using
-ldispatch) as opposed to darwin where it is part of the standard
library and -ldispatch doesn't work.
2016-02-26 09:23:17 +01:00
Lou Logan 0eb0f29a40 MAINTAINERS: remove myself as a server maintainer
Signed-off-by: Lou Logan <lou@lrcd.com>
2016-02-25 18:10:48 -09:00
Matthieu Bouron 666e2edc41 configure: add missing --strip option to show_help() 2016-02-25 21:21:39 +01:00
Carl Eugen Hoyos 0f31d401c3 lavc/mjpegdec: Fix decoding images with Adobe_CM tag.
Fixes ticket #5267.
2016-02-25 13:26:13 +01:00
Carl Eugen Hoyos 03af008e21 doc/filters: Fix idet option name "rep_thres".
Reported by forum user vovcheck.
2016-02-25 13:23:52 +01:00
Matt Oliver 7ecef5ed51 avfilter/hwupload_cuda: Add missing semicolon.
Signed-off-by: Matt Oliver <protogonoi@gmail.com>
2016-02-25 15:52:01 +11:00