1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00
Commit Graph

96443 Commits

Author SHA1 Message Date
Bela Bodecs
8c3e9c9cbb avformat/hlsenc: fix default AES key file url with variant streams
Currently when hls_enc is active and there are multiple variant stream
outputs, default key file url construction does not work, because it is
based on the FormatContext' url field. But in case of multiple variant
streams, it contains the variant m3u8 output playlist url that contains
the %v placeholder. So the result key file url will hold the %v
placeholder causing run time error message about "could not write the
key file".
This patch correct this behaviour, and use the master playlist url for
constructing the output key file url when master playlist is vailable.

Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
2020-01-20 14:34:30 +08:00
Bela Bodecs
dd5c7378bb avformat/hlsenc: program_date_time and append_list flags conflict
When program_date_time flag is present, in m3u8 playlist file each
segment has a corresponding EXT-X-PROGRAM-DATE-TIME value. The intial
program-date-time value is the actual current time at init and
each new segment increments this value by its duration. When append_list
flags is also present, existing playlist parsing by hls_append_segment
treats existing segments as new segments regarding the program-date-time
calculation. But it should not do that, because this way all real the
new segments' EXT-X-PROGRAM-DATE-TIME values will be shifted erroneously
by the sum duration of existing segments. Instead it should have
decremented the initial program-date-time value by its duration. This
would ensure that
the first new segment's program-date-time value had the current time as
it is expected.
This patch corrects this behaviour and prevent existing segments to
increment the value of initial_prog_date_time variable but decrements
it.

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Bela Bodecs <bodecsb@vivanet.hu>
2020-01-20 14:34:26 +08:00
Xuchen Su
9faee5bc14 avformat/udp: modify the not write-only to read-only mode.
not write-only include read-write pseudo flag. so make the flag read-only

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2020-01-20 14:28:56 +08:00
Steven Liu
bc0bedf3c9 avformat/hlsenc: compare without the last directory separator in get_relative_url
fix ticket: 8461
there is no problem before commit 75aea52a10

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2020-01-20 14:23:56 +08:00
Marton Balint
b5dba152ef avformat/dashenc: use ff_rename instead of avpriv_io_move
ff_rename always logs the error message.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-19 22:17:04 +01:00
Marton Balint
19b9f8996e avformat/avio: fix ff_rename to respect used protocol
Also simplify it and make it always log the error.

This fixes for example the image2 muxer when used with an URL which also
contains the protocol:

ffmpeg -f lavfi -i testsrc -vframes 10 -atomic_writing 1 file:out%d.png

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-19 22:17:04 +01:00
Marton Balint
df993269ec avformat/avio: move ff_rename implementation from internal.h to avio.c
Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-19 22:17:04 +01:00
Paul B Mahol
15133c6ab2 avfilter/vf_v360: replace rest of roundf() with lrintf() 2020-01-19 19:54:29 +01:00
Paul B Mahol
3bf28d40e5 avfilter/vf_v360: change remaps to int16_t type 2020-01-19 19:54:29 +01:00
Paul B Mahol
ff5e241bca avfilter/vf_v360: move map variable up 2020-01-19 19:54:29 +01:00
Paul B Mahol
fdc61267b4 avfilter/vf_v360: make more stuff const 2020-01-19 19:54:29 +01:00
Gyan Doshi
4de2106fbf avfilter/pad: improve error check for w and h
Target dimensions have to cover entire input.
2020-01-19 11:17:53 +05:30
Anthony Delannoy
f8990c5f41 avformat/libsrt: fix enabling nonblocking mode
As written in https://github.com/Haivision/srt/blob/v1.4.1/docs/API.md,
the nonblock mode is activated if SRTO_SNDSYN and SRTO_RCVSYN, for
sending and receiving respectively, are set to 0.

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-19 00:17:11 +01:00
Marton Balint
3ffe3b1db0 avformat/img2enc: add support for specifying protocol options
v2: simplified example

Signed-off-by: Marton Balint <cus@passwd.hu>
2020-01-18 23:51:17 +01:00
Michael Niedermayer
a8ceb2a72f avcodec/hevc_mp4toannexb_bsf: check that nalu size doesnt overflow
Fixes: Out of array access
Fixes: 19299/clusterfuzz-testcase-minimized-ffmpeg_BSF_HEVC_MP4TOANNEXB_fuzzer-5169193398042624

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-18 18:35:57 +01:00
Michael Niedermayer
1e23b5a706 avcodec/hevc_mp4toannexb_bsf: Avoid NULL memcpy()
Fixes: invalid memcpy use
Fixes: 19299/clusterfuzz-testcase-minimized-ffmpeg_BSF_HEVC_MP4TOANNEXB_fuzzer-5169193398042624

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-18 18:35:57 +01:00
Michael Niedermayer
a70d836364 avcodec/cbs_av1: Check leb128 values read
"It is a requirement of bitstream conformance that the value returned from the leb128 parsing process is less than or equal
to (1 << 32) - 1."

Fixes: assertion failure
Fixes: 19293/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5749508361420800

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-18 18:35:57 +01:00
Michael Niedermayer
e7af64178a avcodec/iff: Check input space before loop in decode_delta_d()
Fixes: Timeout (114sec ->108ms)
Fixes: 19290/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IFF_ILBM_fuzzer-5740598116220928

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-18 18:35:57 +01:00
Michael Niedermayer
934cc1faf4 avformat/dtsdec: make S16LE discrimination sharper
Both S16LE as well as DTS can have lots of 0 bytes in silent segments
Using these results in error. Thus this patch skips 0 bytes in
comparission.

Fixes Ticket6561

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-18 18:35:57 +01:00
Michael Niedermayer
6a69f04927 avcodec/vc1dec: Allocate only as much space as is unescaped
Fixes: OOM
Fixes: 18137/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-5723834900021248
Fixes: 20037/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-5683758976204800

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-18 18:35:57 +01:00
Paul B Mahol
feeef2f80c avfilter/vf_normalize: add support for >8 depth 2020-01-18 17:28:23 +01:00
Paul B Mahol
ac51173024 avfilter/vf_normalize: add support for planar rgb 2020-01-18 17:28:23 +01:00
Paul B Mahol
4545699625 avfilter/vf_normalize: factor code dealing with AVFrame pixels out 2020-01-18 17:28:23 +01:00
Paul B Mahol
1908818e7b avfilter/vf_normalize: move luts into private context 2020-01-18 17:28:23 +01:00
Paul B Mahol
273886fa60 avfilter/asrc_anoisesrc: add velvet noise 2020-01-18 17:27:10 +01:00
Paul B Mahol
fdddc0d678 avfilter/vf_v360: add perspective output projection 2020-01-18 17:25:48 +01:00
James Almer
6ae84e7b03 avcodec/libx265: zero the padding bytes in extradata
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2020-01-18 12:45:59 -03:00
Steven Liu
b9606064c4 avformat/hls: support data protocol in uri for EXT-X-MAP
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2020-01-18 22:41:11 +08:00
Paul B Mahol
62a0d22621 avfilter/vf_v360: add gaussian interpolation 2020-01-18 13:43:33 +01:00
Paul B Mahol
3972ec28e7 avfilter/vf_v360: fix some small nits 2020-01-18 11:34:10 +01:00
Paul B Mahol
aa42a1e6d7 avfilter/vf_v360: add spline16 interpolation 2020-01-18 10:27:11 +01:00
Jun Zhao
b3cfbd7194 doc/spp: Update spp command options docs
Update spp command options docs

Reviewed-by: Gyan Doshi <ffmpeg@gyani.pro>
Suggested-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-01-18 17:00:16 +08:00
Wang Cao
8c9d82af6b Add a commandline option to control loop restoration for libaom
Signed-off-by: Wang Cao <wangcao@google.com>
Signed-off-by: James Zern <jzern@google.com>
2020-01-17 14:46:50 -08:00
Andriy Gelman
ad326379c6 lavc/h2645_parse: Don't automatically remove nuh_layer_id > 0 packets
HEVC standard supports multi-layer streams (ITU-T H.265 02/2018 Annex
F). Each NAL unit belongs to a particular layer defined by nuh_layer_id
in the header.

Currently, all NAL units that do not belong to a base layer are
automatically removed in ff_h2645_packet_split(). Some data may
therefore be lost when future filters/decoders are designed to support
multi-layer streams.

A better approach is to forward nuh_layer_id > 0 packets and let blocks
down the chain decide how to process them. The condition to remove
packets has been moved to hevcdec and cbs.

Found-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2020-01-17 17:43:52 -03:00
Andreas Rheinhardt
5b7e90b252 avformat/oggparsevorbis: Use AV_DICT_DONT_STRDUP_VAL to avoid av_strdup
This will likely also fix CID 1452427, a false positive resulting from
Coverity thinking that av_dict_set() automatically frees its key and
value parameters (even without the AV_DICT_DONT_STRDUP_* flags).

(AV_DICT_APPEND and AV_DICT_DONT_STRDUP_VAL are compatible with each
other since a8c5b455, so we can reset this flag here. It has originally
been removed in 0dc66553 when appending was added.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-17 20:17:55 +01:00
Andriy Gelman
7938da53b6 configure: Increase minimum libx265 version
libx265.c references a member x265_picture.quantOffsets (for ROI
support) which was added in X265_BUILD 70. Increase the minimum libx265
version to fix compilation.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-17 20:17:55 +01:00
Andreas Rheinhardt
42df71d0c5 avformat/flvenc: Avoid unnecessary seek
When shifting the already written data in order to write the keyframe
index, the flv muxer would first store the pre-shift size, then
calculate how big the index will be eventually, then perform some seeks
to update some size fields, then seek back to the end of the file to get
the new position, followed by a seek to the position where writing will
really start. Seeking back to the (already known) end position (that is
actually used to perform this seek) to get the end position is of course
unnecessary. It has been removed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-17 20:17:55 +01:00
Andreas Rheinhardt
61e0d71946 avformat/movenc, segafilmenc: Remove unnecessary avio_tell()
When the faststart option for the mov/mp4 muxer is used, the current
position (i.e. the size of the already written data pre-shifting) was
evaluated twice: First in an initialization and then again later,
overwriting the first value without having ever touched it. So remove
the initialization.

Also, the clone of this code in the Sega FILM muxer behaves the same and
has been treated the same.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-17 20:17:55 +01:00
Gyan Doshi
c95dfe5cce avfilter/f_metadata: correct check for existing metadata
When adding metadata, existing dictionary need not be present.
2020-01-17 17:35:31 +05:30
Paul B Mahol
7fc28465df avfilter/vf_v360: add cylindrical output projection 2020-01-17 10:46:31 +01:00
James Almer
ab9627223e Revert "avformat/utils: make ff_ntp_time() accept a timestamp as input argument"
Signed-off-by: James Almer <jamrial@gmail.com>
2020-01-16 22:27:35 -03:00
Nicolas Gaullier
80c3a15a1b avformat/s337m: Use base AVClass for av_log usage
s337m_get_offset_and_codec does not make use of
AVFormatContext: AVClass is enough for logging.
Will facilitate further use from outside

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-16 21:45:45 +01:00
Paul B Mahol
330b157c9e avfilter/vf_v360: add pannini output projection 2020-01-16 20:06:28 +01:00
Paul B Mahol
6e082f9f04 avfilter/vf_v360: add fisheye output projection 2020-01-16 18:22:28 +01:00
James Almer
e7c04eaf50 avformat/dashenc: document the new options
Signed-off-by: James Almer <jamrial@gmail.com>
2020-01-15 23:34:37 -03:00
James Almer
05b3460991 avformat/dashenc: add an option to write a Latency element
Allows to set an intended target latency while streaming that clients can use
to measure when using low latency mode.

Signed-off-by: James Almer <jamrial@gmail.com>
2020-01-15 23:34:22 -03:00
Anton Khirnov
bc4f0e713b dashenc: support setting arbitrary HTTP protocol options
Signed-off-by: James Almer <jamrial@gmail.com>
2020-01-15 23:34:22 -03:00
James Almer
c96a9636c8 avformat/dashenc: allow setting custom movflags using format_options
Signed-off-by: James Almer <jamrial@gmail.com>
2020-01-15 23:34:21 -03:00
James Almer
cc929cee76 avformat/movenc: add a flag to enable CMAF compatability
Sets some required constrains and reports compatability with the relevant
compatible brand.

Signed-off-by: James Almer <jamrial@gmail.com>
2020-01-15 23:34:21 -03:00
James Almer
f63407a986 avformat/dashenc: implement DVB-DASH profile
Add new required elements and constrain presence and values for existing
ones based on the spec.

Signed-off-by: James Almer <jamrial@gmail.com>
2020-01-15 23:34:21 -03:00