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

91667 Commits

Author SHA1 Message Date
Zhao Zhili
70d2bab80b lavc/hevc_ps: fix crop info for monochrome
The values of SubWidthC and SubHeightC are 1 in the ITU-T H.265. The
current code use the value of 2.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-22 14:01:12 -03:00
Fredrik Hubinette
5ecd580953 avformat/utils: avoid undefined integer overflow behavior in update_stream_timings()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-22 18:54:23 +02:00
Jacob Trimble
eb350ab738 avformat/mov: Allow saio/saiz in clear content.
If there is a saio/saiz in clear content, we shouldn't create the
encryption index if we don't already have one.  Otherwise it will
confuse the cenc_filter.

The changed method is also used for senc atoms, but they should not
appear in clear content.

Found by Chromium's ClusterFuzz: https://crbug.com/873432

Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-22 18:54:23 +02:00
Baptiste Coudurier
130de9142e avformat/mxfenc: automatically update descriptors klv size 2018-08-22 08:07:35 -07:00
Steven Liu
9e61141905 avformat/hls: support decryption AES128 fmp4 m3u8 list
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-08-22 19:15:15 +08:00
Jun Zhao
e2921578c0 lavc/libkvazaar: fix incompatible pointer type.
fix the waring: libavcodec/libkvazaar.c:210:27: warning: passing argument 3 of ‘av_image_copy’ from incompatible pointer type [-Wincompatible-pointer-types]
                           frame->data, frame->linesize,
                           ^~~~~
In file included from libavcodec/libkvazaar.c:31:0:
./libavutil/imgutils.h:119:6: note: expected ‘const uint8_t ** {aka const unsigned char **}’ but argument is of type ‘uint8_t * const* {aka unsigned char * const*}’
 void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4],

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-08-22 19:06:12 +08:00
Jun Zhao
c4608d225f lavf/hlsenc: fix mixed declarations and code warning.
fix the build warning for "ISO C90 forbids mixed declarations and code"

Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-08-22 19:05:08 +08:00
Martin Vignali
9e64ee3936 avcodec/psd : add support for gray float 2018-08-22 11:36:19 +02:00
Martin Vignali
bdd6754648 swscale/swscale : small cosmetic 2018-08-22 11:36:15 +02:00
Martin Vignali
3af1c4ea7d swscale : treat float input data as uint 16bpc
Currently float are converted to 16b uint in input part
using src depth (32 bits) in hScale16To19 and hScale16to15,
make an invalid shift for the data

So shift the value when using float input
like 16 bpc uint.
2018-08-22 11:36:09 +02:00
Zhong Li
900487043b lavc/qsvenc: add quality status to side_data
Add fix a memory leak issue as James's comments.

V2: use a local pict_type since coded_frame is deprecated.

Signed-off-by: Zhong Li <zhong.li@intel.com>
2018-08-22 15:26:35 +08:00
Jacob Trimble
7e0df5910e avcodec/opus_parser: Handle complete frames flag.
Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-21 19:45:56 -03:00
Baptiste Coudurier
955a989341 avformat/mxfenc: fix muxing when audio tracks are longer than video track 2018-08-21 12:10:41 -07:00
Baptiste Coudurier
b8351ea0c3 avformat/audiointerleave: pad last audio frame 2018-08-21 11:50:06 -07:00
Paul B Mahol
24b24e14d6 avcodec/codec_desc: mark Duck TrueMotion 2.0 Real Time as intra only 2018-08-21 17:11:43 +02:00
Timo Rothenpieler
dc2d56a66b avcodec/nvenc: add option to turn off a53 closed caption embedding 2018-08-21 15:14:56 +02:00
Paul B Mahol
6972dae5a4 avformat/avidec: fix demuxing of all keyframes of sample 200707170736151.avi 2018-08-21 12:14:44 +02:00
Paul B Mahol
a39fdc97b7 doc/general: add some missed codecs 2018-08-21 12:03:36 +02:00
Paul B Mahol
42a99b76de avcodec: add IMM4 decoder
This work is sponsored by VideoLAN.
2018-08-21 11:52:06 +02:00
Steven Liu
dcef44f136 avfilter/buffersrc.h: fix typo of the comment 2018-08-21 15:44:33 +08:00
Michael Niedermayer
78d4b6bd43 avformat/nsvdec: Do not parse multiple NSVf
The specification states "NSV files may contain a single file header. "
Fixes: out of array access
Fixes: nsv-asan-002f473f726a0dcbd3bd53e422c4fc40b3cf3421

Found-by: Paul Ch <paulcher@icloud.com>
Tested-by: Paul Ch <paulcher@icloud.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-20 02:32:41 +02:00
Michael Niedermayer
77429b4217 avcodec/cfhd: Use the actual count instead of the expected in peak_table()
Fixes: out of array access (no testcase)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-20 02:32:41 +02:00
Michael Niedermayer
2c1613ac94 avcodec/cfhd: Move peak_table() and difference_coding() calls after the existing coefficient count check
Fixes: out of array access
Fixes: 9509/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-5283250636324864
Fixes: 9572/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-4920757409808384
Fixes: 9596/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-5114917580439552
Fixes: 9640/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-6247840698335232
Fixes: 9659/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-6079554987753472

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-20 02:32:41 +02:00
Michael Niedermayer
dbac849c4d avcodec/lagarith: Optimize FRAME_SOLID_RGBA
Changes 5466110 decicycles to 1798072 decicycles (tested with fate-suite/lagarith/lag-rgb32.avi)

Fixes: Timeout
Fixes: 9484/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LAGARITH_fuzzer-5707859156271104

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-20 02:32:41 +02:00
James Almer
de1b44c206 avformat/matroskaenc: handle AV1 extradata in packet side data
This is a temporary workaround for transcoding scenarious using libaom-av1
encoder, which currently can't propagate extradata during initialization.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-18 23:32:44 -03:00
Ronak Patel
223d2bde22 Improve hls VOD mode hls performance problem.
This fixes the creation of the hls manifest in hlsenc.c by writing the
entire manifest at the end for VOD playlists. Live & Event Playlists are unaffected.
This also fixes the behavior with HLS_TEMP_FILE to work correctly when
-hlsflags temp_file is specified, instead of always relying on use_rename, which caused these problems.

Files that would previously take over a week to fragment now take
1 minute on the same hardware. This was a 153 hour audio file (2.2GB of audio).

Signed-off-by: Ronak Patel <ronak2121@yahoo.com>
2018-08-19 09:57:44 +08:00
Michael Niedermayer
46753bfdd0 avformat/dashdec: Fix strlen(rep_id_val) with it being NULL
Fixes: dash-crash-da39a3ee5e6b4b0d3255bfef95601890afd80709.xml

Found-by: Paul Ch <paulcher@icloud.com>
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-19 02:47:33 +02:00
Paweł Wegner
85c00643b7 avformat/tls_schannel: Fix use of uninitialized variable
Fixes: runtime error: passing uninitialized value to FreeContextBuffer
causes a crash

Signed-off-by: Paweł Wegner <pawel.wegner95@gmail.com>
2018-08-18 16:40:05 +02:00
Jun Zhao
49efd41c47 lavf/udp: use ff_log_net_error to replace log_net_error
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-08-18 16:16:11 +08:00
Jun Zhao
0ed0af595b lavf/tcp: check return value of setsockopt.
when setsockopt fail, use ff_log_net_error to dump the string
describing for error number.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-08-18 16:16:11 +08:00
Jun Zhao
0a8ff1d8bb lavf/network: check return value of setsockopt.
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-08-18 16:16:11 +08:00
Jun Zhao
d428ef0ea5 lavf/network: add a ff_log_net_error function.
add a ff_log_net_error function for error log.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-08-18 16:16:11 +08:00
Michael Niedermayer
c2eec1762d avformat/rmdec: Fix EOF check in the stream loop in ivr_read_header()
Fixes: long running loop
Fixes: ivr-timeout-42468cb797f52f025fb329394702f5d4d64322d6

Found-by: Paul Ch <paulcher@icloud.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-17 21:53:13 +02:00
Michael Niedermayer
1e71cb2c8e avformat/mlvdec: read_string() received unsigned size, make the argument unsigned
Fixes: infinite loop
Fixes: mlv-timeout-e3b8cab9835edecad6823baa057e029671329d04

Found-by: Paul Ch <paulcher@icloud.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-17 21:53:13 +02:00
James Almer
f00964e2f7 avformat/av1: filter out tile list OBUs from samples
As per the updated spec.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-17 15:26:05 -03:00
James Almer
7b5f93d4e1 avformat: bump micro version after previous changes
Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-17 15:22:28 -03:00
James Almer
728760de35 Revert "avcodec/libaomdec: auto insert dump_extra bitstream filter"
This reverts commit e45ed15594.

The Matroska spec was updated to not remove Sequence Header OBUs from key
frames, so this is no longer needed.
2018-08-17 15:17:59 -03:00
James Almer
8d5604a69a avformat/av1: update ff_isom_write_av1c() to the latest revision of the spec
This will get ISOBMFF and Matroska up to date with the revised AV1 Codec
Configuration Box spec.
For now keep propagating raw OBUs as extradata until all libavcodec modules
are adapted to handle AV1CodecConfigurationRecord formatted extradata.

Tested-by: Thomas Daede <bztdlinux@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-17 15:09:02 -03:00
James Almer
96a7099f3e avcodec/av1_parse: take trailing bits into account when initializing the GetBitContext
Also only initialize it in ff_av1_packet_split() and not ff_av1_extract_obu(),
same as h2645_parse, so GetBitContext specific failures may not affect the
latter.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-17 15:09:01 -03:00
Kieran Kunhya
c85852d3de h264: Support multi-field closed captions by using AVBufferRef and not resetting per field
Signed-off-by: Josh de Kock <joshdk@obe.tv>
2018-08-17 16:24:19 +01:00
James Almer
f631c328e6 avcodec/decode: copy the output parameters from the last bsf in the chain back to the AVCodecContext
Certain AVCodecParameters, like the contents of the extradata, may be changed
by the init() function of any of the bitstream filters in the chain.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-16 23:43:13 -03:00
James Almer
94fe138de0 avcodec/decode: flush the internal bsfs instead of constantly reinitalizing them
Initialize the bsfs once when opening the codec and uninitialize them once when
closing it, instead of at every codec flush/seek.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-16 23:43:12 -03:00
James Almer
2954e51393 avcodec/h264_redundant_pps_bsf: implement a AVBSFContext.flush() callback
Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-16 23:43:12 -03:00
James Almer
e5b1f2b027 avcodec/mpeg4_unpack_bframes_bsf: implement a AVBSFContext.flush() callback
Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-16 23:43:12 -03:00
James Almer
e9980c451e avcodec/vp9_superframe_bsf: implement a AVBSFContext.flush() callback
Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-16 23:43:11 -03:00
James Almer
63e0846c66 avcodec/vp9_superframe_split_bsf: implement a AVBSFContext.flush() callback
Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-16 23:43:11 -03:00
James Almer
390f156451 avcodec/h264_mp4toannexb_bsf: implement a AVBSFContext.flush() callback
Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-16 23:43:10 -03:00
James Almer
b33f5299a5 avcodec/bsf: add a flushing mechanism to AVBSFContext
Meant to reset the internal bsf state without the need to reinitialize it.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-08-16 23:43:10 -03:00
Jun Zhao
fe06ed22e6 lavfi: fix can't dispaly "slice" sub-option in "ffmpeg -h full"
fix can't dispaly "slice" sub-option in "ffmpeg -h full" for
 AVFilter options.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
2018-08-16 19:45:07 +08:00
lee ju
6a0feafebe avcodec/frame_thread_encoder: fix memory leak that occurs when close encoder without sending eof and receiving to end
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-08-16 03:05:54 +02:00