Commit Graph

82997 Commits

Author SHA1 Message Date
Tobias Rapp 5796048f6a avformat/avidec: clean-up identifier names
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-03 13:46:55 +01:00
Michael Niedermayer 4221c68edb avformat/flvenc: Check for extradata allocation failure
Fixes CID1396539

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-03 03:25:25 +01:00
Andreas Cadhalpun e8651f51aa wmavoice: validate block alignment
This prevents a division by zero crash in wmavoice_decode_packet.

The problem was introduced by commit
3deb4b54a2.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2017-01-03 00:52:55 +01:00
Andreas Cadhalpun 91e6a64d2e wmavoice: truncate spillover_nbits if too large
This fixes triggering the av_assert0(ret <= tmp.size).

The problem was reintroduced by commit
7b27dd5c16 and originally fixed by
2a4700a4f0.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2017-01-03 00:51:58 +01:00
Michael Niedermayer aa95292043 avcodec/x86/vc1dsp_mc: Fix build with NASM 2.09.10
make fate passes

Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-02 22:37:55 +01:00
John Comeau d06518752b avcodec/x86/imdct36: fix building with nasm 2.11.05
fixes `operation size not specified` errors as described here:
http://stackoverflow.com/questions/36854583/compiling-ffmpeg-for-kali-linux-2

I rebuilt again with yasm and made sure it didn't break that.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-02 20:44:16 +01:00
Steven Liu 16ff54664a avformat/rtmphttp: fix bug for rtmphttp
if the http server don't response the http command,
then the thread will be blocked and never be interrupted.

Reported-by: yinyunjiang <yinyunjiang1991@qq.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-02 19:35:47 +01:00
Michael Niedermayer 3d8a8fd27e avfilter/vf_pad: Fix segfault if reconfiguration fails
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-02 18:42:31 +01:00
Carl Eugen Hoyos 28307ef7e6 lavc/psd: Support indexed files.
Fixes ticket #6045.
2017-01-02 11:39:21 +01:00
James Almer d800d48fc6 configure: bump year
Happy new year!
2017-01-02 01:38:14 -03:00
Thomas Turner 3126ca2825 avutil/tests: added selftest for aes_ctr.c
Signed-off-by: Thomas Turner <thomastdt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-02 02:45:43 +01:00
Michael Niedermayer 68cdeb06de avcodec/tests/fft: Fix indention of dct_init()
Fixes CID1396253

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-01 23:04:31 +01:00
Carl Eugen Hoyos 375a22a472 lavf/img2dec: Increase detection score of jpgs without EOI.
Also increases the score for large jpeg files.
Fixes autodetection for the file from mpv issue 3973.
2017-01-01 18:59:57 +01:00
Carl Eugen Hoyos 4acea512f3 lavc/mjpegdec: Do not overread too short JFIF tags.
Fixes ticket #6055.
2017-01-01 18:53:27 +01:00
Thomas Turner b7a6d28e5e avutil/tests: improved code coverage for atomic
Signed-off-by: Thomas Turner <thomastdt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-01-01 16:57:55 +01:00
Miroslav Slugen 9b425bd24c avcodec/nvenc: Add bluray_compat basic implementation
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-01-01 14:47:25 +01:00
Miroslav Slugen 1841eda679 avcodec/nvenc: Make AUD optional for h264_nvenc and hevc_nvenc
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-01-01 14:37:09 +01:00
Miroslav Slugeň f8c503d927 avcodec/nvenc: round qpIntra and qpInter calculation
Round qpIntra and qpInter calculation instead of old floor behavior.

Adopted from vaapi_encode_h264.c

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2017-01-01 14:34:42 +01:00
Bela Bodecs 03a69bd897 avformat/hlsenc: Duplicated segment filenames and use_localtime_mkdir
Current implementation of finding duplicate segment filenames may fail
if use_localtime_mkdir and use_localtime are in effect and
segment_filename option expression contains subdirectories with
date/time specifiers. This patch fixes this false behaviour.

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-01-01 20:22:34 +08:00
Bela Bodecs 8fd3e02eee libavformat/hlsenc: default segment name and use_localtime
in hlcenc.c, in the hls_write_header() function the default format
string for strftime() function contains %s specifier when use_localtime
is true. This %s specifier will insert the seconds since EPOCH. But %s
is not available on all system/environment. This patch check %s
availabilty at runtine and alter the default format string if necessary.

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2017-01-01 11:00:45 +08:00
Michael Niedermayer 7525517593 libavutil/random_seed: Ensure that get_generic_seed() spends at least 1/32 sec gathering entropy
This may fix the failures on windows

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-31 17:20:06 +01:00
Moritz Barsnick 5dbce5120b doc: document cutoff option to ac3 and adjust the option's global documentation
cutoff is implemented as an option global to lavc, but supported only
by a few encoders. This fact is now reflected in its documentation. ac3's
support of this option is added for completeness.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-31 17:20:06 +01:00
Moritz Barsnick 6c442e1584 lavc/libmp3lame: add support for cutoff
Pass the cutoff option from lavc's avcodec_options[] to libmp3lame's
lowpass option, without allowing to adjust its default behavior.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-31 17:20:06 +01:00
Thomas Turner 1bfb4587a2 avutil/tests/audio_fifo.c: Memory leak and tab space fixes
Prevents memory leak when read_samples_from_audio_fifo() is
called more than once by deallocating before reallocating
more memory.

Fixes space indentation for contents in ERROR().

Signed-off-by: Thomas Turner <thomastdt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-31 17:20:06 +01:00
Thomas Turner 11b7cad3dc avutil/tests/audio_fifo.c: use av_malloc() family of functions
Signed-off-by: Thomas Turner <thomastdt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-31 17:20:01 +01:00
Michael Niedermayer af7a75cb51 configure: Check build with some header not just preprocessing for testing --std=c11
Fixes build failure on FreeBSD with gcc 4.7

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-31 13:11:37 +01:00
Clément Bœsch 771b3a956e lavfi/selectivecolor: rename adjust_range to scale
This variable corresponds to the final scale of the adjustement for a
given color range.
2016-12-31 13:01:04 +01:00
Carl Eugen Hoyos 5ff6e8790a doc/filters: Slightly improve the smartblur documentation.
Fixes ticket #6034.
2016-12-31 12:06:42 +01:00
Michael Niedermayer 25d9643f11 avcodec/mjpegdec: Check for rgb before flipping
Fixes assertion failure due to unsupported case

Fixes: 356/fuzz-1-ffmpeg_VIDEO_AV_CODEC_ID_MJPEG_fuzzer
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-31 03:21:05 +01:00
Carl Eugen Hoyos ec2f3b1f57 lavc/psd: Remove an uninitialized variable. 2016-12-30 12:08:26 +01:00
James Almer 6993bb4eb6 configure: make the check for stdatomic.h stricter
Old ICC verions don't advertise having a full C11 implementation but
may nonetheless include a feature-incomplete stdatomic.h header.

Fixes ticket #6049

Signed-off-by: James Almer <jamrial@gmail.com>
2016-12-30 00:01:38 -03:00
Michael Niedermayer ffc3337e0b avfilter/vf_pad: Add eval=frame support
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-30 02:29:19 +01:00
Matt Wolenetz fe7547d69e lavf/utils.c Protect against accessing entries[nb_entries]
In ff_index_search_timestamp(), if b == num_entries,
m == num_entries - 1, and entries[m].flags & AVINDEX_DISCARD_FRAME is
true, then the search for the next non-discarded packet could access
entries[nb_entries], exceeding its bounds. This change adds a protection
against that scenario. Reference: https://crbug.com/666770

Reviewed-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-30 00:11:18 +01:00
Bela Bodecs 9ec52a0a9b libavformat/hlsenc: fix delete_segments when use_localtime_mkdir
When delete_segments hls_flag is specified, deleting old segments may
fail in certain cases when use_localtime_mkdir is in effect and
hls_segment_filename expression contains subdirs. This patch fixes this
behaviour.

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2016-12-29 12:00:20 +08:00
Michael Niedermayer a830ab3f3b ffmpeg: remove stop_encoding variable and related code, it is dead / unused code
Fixes: CID1396243

Reviewed-by: compn <tempn@mi.rr.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-28 19:19:15 +01:00
Paul B Mahol 49abd5dbb8 avfilter/avf_aphasemeter: make video output optional
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-12-28 17:03:57 +01:00
Jan Sebechlebsky 7c91ee01cc libavformat/tee: Add fifo support for tee
Signed-off-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com>
2016-12-28 16:18:15 +01:00
Michael Bradshaw 616513ef6e avcodec/libopenjpegdec: Set key frame metadata
Signed-off-by: Michael Bradshaw <mjbshaw@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-28 16:04:59 +01:00
Thomas Turner d7a3c7427f avutil/tests/audio_fifo.c: Corrected test error messages
Signed-off-by: Thomas Turner <thomastdt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-28 16:04:59 +01:00
Burt P f317080024 af_hdcd: more FATE tests
Additional/Modified FATE tests improve code coverage from 63.7% to 98.1%.

Changed fate-suite sample files:
* filter/hdcd-mix.flac (958K) added. It is a much better test than
  filter/hdcd.flac (910K), which is now unused, but can't be removed.
* filter/hdcd-fake20bit.flac (168K) added. It is the first second of
  filter/hdcd.flac, with the 16-bit LSB copied into bit 20 of a 24-bit
  stream. There isn't an actual non-16-bit HDCD sample available to test.

Signed-off-by: Burt P <pburt0@gmail.com>
2016-12-28 03:46:10 -06:00
Clément Bœsch afaaf8db18 lavfi/selectivecolor: simplify crazy mid val computations 2016-12-27 23:56:23 +01:00
Clément Bœsch 571a360157 lavfi/transpose: add missing const options flags
Fixes ffmpeg -h filter=transpose
2016-12-27 23:49:44 +01:00
Christophe Gisquet e3312b3746 MAINTAINERS: update 2016-12-27 18:24:31 +01:00
Ronald S. Bultje 33d7f822f8 wmavoice: protect against zero-energy in adaptive gain control.
Otherwise the scale factor becomes NaN, resulting in corrupt output.
Fixes #5426.
2016-12-27 10:02:34 -05:00
Ronald S. Bultje 7b27dd5c16 wmavoice: move overflow handling to common code. 2016-12-27 10:02:34 -05:00
Ronald S. Bultje b011bb5f8b wmavoice: reindent. 2016-12-27 10:02:33 -05:00
Ronald S. Bultje 3deb4b54a2 wmavoice: disable bitstream checking.
The checked bitstream reader does that already. To allow parsing of
superframes split over a packet boundary, we always decode the last
superframe in each packet at the start of the next packet, even if
theoretically we could have decoded it. The last superframe in the
last packet is decoded using AV_CODEC_CAP_DELAY.
2016-12-27 10:02:33 -05:00
Ronald S. Bultje 992cb15e67 wmavoice: move wmavoice_flush() up. 2016-12-27 10:02:33 -05:00
Ronald S. Bultje 1c8fbd7b90 checkasm/vp9: benchmark all sub-IDCTs (but not WHT or ADST). 2016-12-27 10:02:33 -05:00
Bodecs Bela 0ff8c6b6d5 avformat/hlsenc: strftime identifiers and segment index
in filenames

Putting date/time values into segment filenames is very usefull.
But to produce non-conflicting segment filenames with -use_localtime
option with date/time
values in hls_segment_filename option, sometimes is not enough.
Like in cases when multiple segments produced in the same second.
But hlsenc currently does not make possible to use segment index (%d) at
the

same time whe use_localtime is in effect, due to identifier conflict.
This patch makes possible to use strftime identifiers and still put
segment index (%d) at same time in segment filenames by introducing
second_level_segment_index flag. When -use_localtime is active,
identifier %d is for month day index, so %%d is the segment index
placeholder. This enhanced behaviour only exists when new
second_level_segment_index flag is specified.
For instance putting 'segment_%Y%m%d%H%M%S_%%05d.ts' value into
-hls_segment_filename option and specifing -hls_flags
second_level_segment_index and -use_localtime 1, may produce segment
filename as 'segment_20161230235758_00002.ts'

An example:

ffmpeg -loglevel info -y -f lavfi -i color=c=red:size=640x480:r=25 -f
lavfi -i anullsrc=r=44100:cl=stereo -c:v mpeg2video -g 25 -acodec aac
-cutoff 20000 -ac 2 -ar 44100 -ab 192k -f hls -hls_time 3 -hls_list_size
5 -hls_flags delete_segments+second_level_segment_index -use_localtime 1
-hls_segment_filename "segment_%Y%m%d%H%M%S_%%05d.ts" stream.m3u8

will produce segments filenames:

....
segment_20161227005902_00013.ts
segment_20161227005902_00014.ts
segment_20161227005902_00015.ts
segment_20161227005903_00016.ts
segment_20161227005903_00017.ts
segment_20161227005903_00018.ts
segment_20161227005903_00019.ts
segment_20161227005903_00020.ts
....

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
2016-12-27 10:40:35 +08:00