summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* avformat: Don't free old extradata before ff_alloc/get_extradataAndreas Rheinhardt2019-12-1218-37/+4
| | | | | | | | These functions already free it themselves before they allocate the new extradata. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat: Forward errors where possibleAndreas Rheinhardt2019-12-1271-275/+310
| | | | | | | | | | It is not uncommon to find code where the caller thinks to know better what the return value should be than the callee. E.g. something like "if (av_new_packet(pkt, size) < 0) return AVERROR(ENOMEM);". This commit changes several instances of this to instead forward the actual error. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/rtpdec_hevc: Don't reimplement ff_alloc_extradataAndreas Rheinhardt2019-12-121-9/+2
| | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/apngdec: Don't free extradata manuallyAndreas Rheinhardt2019-12-121-4/+0
| | | | | | | | The extradata will be freed automatically when the corresponding stream gets freed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/apngdec: Make sure that extradata is zero-paddedAndreas Rheinhardt2019-12-121-5/+5
| | | | | | | Zeroing the padding has been forgotten. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/mov: Use ff_alloc_extradata for dvdsub extradataAndreas Rheinhardt2019-12-121-7/+4
| | | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Reviewed-by: "mypopy@gmail.com" <mypopy@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/x265: set preferred_transfer_characteristics for HLGZhong Li2019-12-121-0/+4
| | | | | | | | | | | "HEVC HDR UHDTV Bitstreams using HLG10 shall also contain the alternative_transfer_characteristics SEI message. The alternative_transfer_characteristics SEI message shall be inserted on the HEVC DVB_RAP, and preferred_transfer_characteristics shall be set equal to "18", indicating Recommendation ITU-R BT. 2100 [45] HLG system." Signed-off-by: Zhong Li <zhongli_dev@126.com>
* lavc/qsvenc: add Tiles encode support for HEVCLinjie Fu2019-12-123-1/+41
| | | | | | | | | | | | | | | | | | | | | | Add -tile_rows and -tile_cols option to specify the number of tile rows and columns for ICL+ (gen 11) platform. A tile must wholly contain all the slices within it. Slices cannot cross tile boundaries. So the slice number would be implicitly resized to the max(nSlice, nTile). Example: ffmpeg -v verbose -hwaccel qsv -init_hw_device qsv=hw -filter_hw_device hw -f rawvideo -s:v 1920x1080 -i ./input.nv12 -vf format=nv12,hwupload=extra_hw_frames=64 -c:v hevc_qsv -tile_rows 2 -tile_cols 2 -slices 4 -y output.h265 Also dump the actual quantity of encoded tiled rows and columns in run time. Fix the enhancement #8400. Signed-off-by: Linjie Fu <linjie.fu@intel.com>
* lavf/movenc: cosmeticsYuki Tsuchiya2019-12-121-33/+33
| | | | | Signed-off-by: Yuki Tsuchiya <Yuki.Tsuchiya@sony.com> Signed-off-by: James Almer <jamrial@gmail.com>
* Changelog: add entry about MPEG-H 3D Audio support in mp4James Almer2019-12-121-0/+1
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* lavf/isom: support for demuxing and remuxing of MPEG-H 3D Audio in MP4Yuki Tsuchiya2019-12-122-0/+3
| | | | | | | | | Implemented according to the specification at https://www.iso.org/standard/69561.html The 'mhm1' sample entry is registered with MP4RA, which is defined as MHAS encapsulated single stream MPEG-H 3D Audio. 'MHAS' stands for MPEG-H audio stream, which contains encoded audio data and corresponds metadata for decoding. This patch enables extracting the MHAS bitstream from MP4 and remuxing into MP4. Signed-off-by: James Almer <jamrial@gmail.com>
* lavc: add MPEG-H 3D Audio codec idYuki Tsuchiya2019-12-123-2/+10
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* lavc/codec_desc: introduce AV_CODEC_PROP_INTRA_ONLY flag to audio codecYuki Tsuchiya2019-12-122-171/+175
| | | | | | | Introduce AV_CODEC_PROP_INTRA_ONLY flag to audio codec as well as video codec to support non intra-only audio codec. Signed-off-by: Yuki Tsuchiya <Yuki.Tsuchiya@sony.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/mlp_parser: mark sync frames as key framesJames Almer2019-12-121-0/+6
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* rtsp: Use AVERROR() with errno.h error codes for error returnsMartin Storsjö2019-12-121-1/+1
| | | | | | | This particular function is only required to return nonzero on errors, but use the common AVERROR() pattern for consistency. Signed-off-by: Martin Storsjö <martin@martin.st>
* fate: Fix use of target_path/target_samplesMartin Storsjö2019-12-125-68/+68
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* fate: Fix dependencies to sample files to use local pathsMartin Storsjö2019-12-123-21/+21
| | | | | | | These dependencies are evaluted by make and must be expressed with the paths as in the local filesystem. Signed-off-by: Martin Storsjö <martin@martin.st>
* fate/cbs: update the two film grain cbs_av1 testsJames Almer2019-12-112-2/+2
| | | | | | They were missed in the previous commit. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/cbs_av1: fix array size for ar_coeffs_cb_plus_128 and ↵James Almer2019-12-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | ar_coeffs_cr_plus_128 Taking into account the code fb(2, ar_coeff_lag); num_pos_luma = 2 * current->ar_coeff_lag * (current->ar_coeff_lag + 1); if (current->num_y_points) num_pos_chroma = num_pos_luma + 1; else num_pos_chroma = num_pos_luma; Max value for ar_coeff_lag is 3 (two bits), for num_pos_luma 24, and for num_pos_chroma 25. Both ar_coeffs_cb_plus_128 and ar_coeffs_cr_plus_128 may have up to num_pos_chroma values. Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* fate: Use a oneoff test for the tremolo filterMartin Storsjö2019-12-112-28/+5
| | | | | | | | | | | | | | | | The tremolo filter uses floating point internally, and uses multiplication factors derived from sin(fmod()), neither of which is bitexact for use with framecrc. This fixes running this test when built with for mingw/x86_32 with clang. In this case, a 1 ulp difference in the output from fmod() would end up in an output from the filter that differs by 1 ulp, but which makes the lrint() in swresample/audioconvert.c round in a different direction. Signed-off-by: Martin Storsjö <martin@martin.st>
* checkasm: float_dsp: Scale FLT/DBL_EPSILON sufficiently when comparingMartin Storsjö2019-12-111-3/+6
| | | | | | | | | | | | | As the values generated by av_bmg_get can be arbitrarily large (only the stddev is specified), we can't use a fixed tolerance. This matches what was done for test_vector_dmul_scalar in 38f966b2222db. This fixes the float_dsp checkasm test for some seeds, when built with clang for mingw/x86_32. Signed-off-by: Martin Storsjö <martin@martin.st>
* network: Define ENOTCONN as WSAENOTCONN if not definedMartin Storsjö2019-12-111-0/+3
| | | | | | | This fixes compilation with old mingw.org toolchains, which has got much fewer errno.h entries. Signed-off-by: Martin Storsjö <martin@martin.st>
* avcodec/cbs_av1: rename enable_intraintra_compound flagFei Wang2019-12-113-4/+4
| | | | | | | | rename enable_intraintra_compound to enable_interintra_compound, which keep same as AV1 sepc(v1.0.0-errata1). Signed-off-by: Fei Wang <fei.w.wang@intel.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/iff: Use ff_alloc_extradataAndreas Rheinhardt2019-12-111-8/+7
| | | | | | | | Besides improved readability it also zeroes the padding which has been forgotten here. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/flvenc: Don't reimplement ff_alloc_extradataAndreas Rheinhardt2019-12-111-7/+3
| | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/apc: Remove unnecessary resetting of flagsAndreas Rheinhardt2019-12-111-1/+0
| | | | | | | | | The packet a demuxer receives is freshly initialized, hence it is unnecessary to reset any flags on them (as none are set), yet apc did this. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/scale_eval: remove redundant mathematical constantsGyan Doshi2019-12-111-12/+0
| | | | | Even though removed from vf_scale in 3b316f9f22, they were reintroduced when scale.c, now scale_eval.c, was split off in 037bb4021c
* avformat/cache: rename the class name fro Cache to cacheSteven Liu2019-12-111-1/+1
| | | | | | | | | | | | liuqideMacBook-Pro:build liuqi$ ffmpeg --help full | grep cache cannot find cache protocol options. after patch: bogon:dash liuqi$ ./ffmpeg --help full | grep cache cache AVOptions: can find the cache AVOptions after patch. Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* avformat/hlsenc: remove duplicate code blockSteven Liu2019-12-111-21/+5
| | | | Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* lavf/tls_openssl: support both pre-1.1.0 and post-1.1.0 initJun Zhao2019-12-111-0/+7
| | | | | | | | supporting both pre-1.1.0 and post-1.1.0 version of the OpenSSL library as the link: https://wiki.openssl.org/index.php/Library_Initialization Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* configure: add OPENSSL_init_ssl check if pkg-config failmacweng2019-12-111-0/+1
| | | | | | | | fix when pkg-config fail and openssl > 1.1.0 --enable-openssl fail, the root cause is check_lib can't found the SSL_library_init(). Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: macweng <macweng@tencent.com>
* lavf/libsrt: enable other encryption parametersJun Zhao2019-12-112-0/+38
| | | | | | | Enable the SRTO_ENFORCEDENCRYPTION/SRTO_KMREFRESHRATE/ SRTO_KMPREANNOUNCE for srt encryption control. Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* lavf/libsrt: add linger parameter to libsrtJun Zhao2019-12-112-0/+19
| | | | | | | | add linger parameter to libsrt, it's setting the number of seconds that the socket waits for unsent data when closing. Reviewed-by: Andriy Gelman <andriy.gelman@gmail.com> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* avcodec/cbs_av1: avoid reading trailing bits when obu type is OBU_TILE_LISTFei Wang2019-12-101-0/+1
| | | | | Signed-off-by: Fei Wang <fei.w.wang@intel.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/rmdec: Initialize and sanity check offset in ivr_read_header()Michael Niedermayer2019-12-101-1/+3
| | | | | | | | Fixes: signed integer overflow: -9223372036854775808 - 17 cannot be represented in type 'long' Fixes: 18768/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5674385247830016 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* swscale/swscale_unscaled: add AV_PIX_FMT_GBRAP10 for LE and BE conversion ↵Limin Wang2019-12-101-0/+2
| | | | | | | wrapper Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/agm: Do not allow MVs out of the picture area as no edge is allocatedMichael Niedermayer2019-12-101-2/+2
| | | | | | | | Fixes: out of array access Fixes: 18499/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5749038406434816 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/wmalosslessdec: Set FF_CODEC_CAP_INIT_CLEANUPMichael Niedermayer2019-12-101-0/+1
| | | | | | | | | Fixes: memleaks Fixes: 18429/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-6210814364614656 Fixes: 18722/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5680535690543104 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/apedec: Fix 2 integer overflowsMichael Niedermayer2019-12-101-2/+2
| | | | | | | | Fixes: signed integer overflow: 2119056926 - -134217728 cannot be represented in type 'int' Fixes: 18728/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5747539563511808 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/wmaprodec: Set packet_loss when we error out on a sanity checkMichael Niedermayer2019-12-101-0/+1
| | | | | | | | Fixes: left shift of negative value -34 Fixes: 18719/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMAPRO_fuzzer-5642658173419520 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/wmaprodec: Check offsetMichael Niedermayer2019-12-101-0/+5
| | | | | | | | Fixes: index 33280 out of bounds for type 'float [32768]' Fixes: 18718/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XMA2_fuzzer-5635373899710464 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/truemotion2: Fix 2 integer overflows in tm2_low_res_block()Michael Niedermayer2019-12-101-2/+2
| | | | | | | | Fixes: signed integer overflow: 1778647621 + 574372924 cannot be represented in type 'int' Fixes: 18692/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-6248679635943424 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/wmaprodec: Check if the channel sum of all internal contexts match ↵Michael Niedermayer2019-12-101-0/+2
| | | | | | | | | | the external Fixes: NULL pointer dereference Fixes: 18689/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_XMA1_fuzzer-5715114640015360 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/truespeech: Fix an integer overflow in truespeech_synth()Michael Niedermayer2019-12-101-1/+1
| | | | | | | | Fixes: signed integer overflow: 2147483188 + 2048 cannot be represented in type 'int' Fixes: 18741/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUESPEECH_fuzzer-5748950460268544 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Remove redundant ;Michael Niedermayer2019-12-105-6/+6
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/id3v2: Fix double-free on errorAndreas Rheinhardt2019-12-101-2/+0
| | | | | | | | | | | | | ff_id3v2_parse_priv_dict() uses av_dict_set() with the flags AV_DICT_DONT_STRDUP_KEY and AV_DICT_DONT_STRDUP_VAL. In this case both key and value are freed on error (and owned by the destination dictionary on success), so that freeing them again on error is a double-free and therefore forbidden. But it nevertheless happened. Fixes CID 1452489 and 1452421. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter: rename scale.c,h to scale_evalGyan Doshi2019-12-107-12/+12
| | | | scale.c is too generic; scale_eval is more representative
* fate/matroska: Add a test for propagating flac channel layoutsAndreas Rheinhardt2019-12-082-0/+44
| | | | | | | | contained in Vorbis comments in the CodecPrivate of flac tracks. Moreover, it also tests header removal compression. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* tools/target_dec_fuzzer: Also fuzz request_channel_layoutMichael Niedermayer2019-12-081-0/+1
| | | | | | This should improve coverage Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/scale.c: factorize ff_scale_eval_dimensionsGyan Doshi2019-12-087-38/+146
| | | | | | | Adjustment of evaluated values shifted to ff_adjust_scale_dimensions Shifted code for force_original_aspect_ratio and force_divisble_by from vf_scale so it is now available for scale_cuda, scale_npp and scale_vaapi as well.