]> git.sesse.net Git - ffmpeg/log
ffmpeg
5 years agoavcodec/shorten: Fix signed 32bit overflow in shift in shorten_decode_frame()
Michael Niedermayer [Sun, 12 Aug 2018 21:06:55 +0000 (23:06 +0200)]
avcodec/shorten: Fix signed 32bit overflow in shift in shorten_decode_frame()

Fixes: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
Fixes: 9480/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SHORTEN_fuzzer-6647324284551168 -rss_limit_mb=2000
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/shorten: Fix integer overflow in residual/LPC combination
Michael Niedermayer [Sun, 12 Aug 2018 20:55:59 +0000 (22:55 +0200)]
avcodec/shorten: Fix integer overflow in residual/LPC combination

Fixes: signed integer overflow: -540538872 + -2012739576 cannot be represented in type 'int'
Fixes: 9255/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SHORTEN_fuzzer-5758630052757504
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/shorten: Check verbatim length
Michael Niedermayer [Sun, 12 Aug 2018 20:43:33 +0000 (22:43 +0200)]
avcodec/shorten: Check verbatim length

Fixes: Timeout
Fixes: 9252/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SHORTEN_fuzzer-5780720709533696
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavfilter/vf_hue: 10bit support
Michael Niedermayer [Wed, 1 Aug 2018 17:48:08 +0000 (19:48 +0200)]
avfilter/vf_hue: 10bit support

Tested-by: Tobias Rapp <t.rapp@noa-archive.com>
Tested-by: Reto Kromer <lists@reto.ch>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agodoc/filters: Add entry for sr filter.
Sergey Lavrushkin [Wed, 15 Aug 2018 16:35:09 +0000 (19:35 +0300)]
doc/filters: Add entry for sr filter.

Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro>
5 years agoavutil/encryption_info: Fix size calculation.
Jacob Trimble [Mon, 13 Aug 2018 22:17:11 +0000 (15:17 -0700)]
avutil/encryption_info: Fix size calculation.

Found by Chrome's ClusterFuzz: https://crbug.com/873693

Signed-off-by: Jacob Trimble <modmaker@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agolavfi/vf_colorconstancy: cosmetic update
Mina [Tue, 14 Aug 2018 18:56:51 +0000 (20:56 +0200)]
lavfi/vf_colorconstancy: cosmetic update

5 years agolavfi/vf_colorconstancy: change option ranges
Mina [Tue, 14 Aug 2018 18:55:08 +0000 (20:55 +0200)]
lavfi/vf_colorconstancy: change option ranges

5 years agolibavfilter: Adds proper file descriptions to dnn_srcnn.h and dnn_espcn.h.
Sergey Lavrushkin [Thu, 2 Aug 2018 16:56:23 +0000 (19:56 +0300)]
libavfilter: Adds proper file descriptions to dnn_srcnn.h and dnn_espcn.h.

Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
5 years agolibavfilter/vf_sr.c: Removes uint8 -> float and float -> uint8 conversions.
Sergey Lavrushkin [Tue, 31 Jul 2018 15:58:28 +0000 (18:58 +0300)]
libavfilter/vf_sr.c: Removes uint8 -> float and float -> uint8 conversions.

Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
5 years agolibavfilter/dnn_backend_tf.c: Fixes ff_dnn_free_model_tf.
Sergey Lavrushkin [Tue, 31 Jul 2018 15:40:24 +0000 (18:40 +0300)]
libavfilter/dnn_backend_tf.c: Fixes ff_dnn_free_model_tf.

Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
5 years agolavc/videotoolboxenc: Fix compilation on osx 10.10.5 Yosemite
Thilo Borgmann [Thu, 9 Aug 2018 10:47:35 +0000 (12:47 +0200)]
lavc/videotoolboxenc: Fix compilation on osx 10.10.5 Yosemite

Signed-off-by: Aman Gupta <aman@tmm1.net>
5 years agoavformat: correct fdebug loglevel
Gyan Doshi [Mon, 13 Aug 2018 07:02:41 +0000 (12:32 +0530)]
avformat: correct fdebug loglevel

fftools/cmdutils sets loglevel for fdebug to DEBUG but all fdebug output
except for two were emitted at TRACE.

5 years agolibswscale: Adds conversions from/to float gray format.
Sergey Lavrushkin [Fri, 3 Aug 2018 15:06:50 +0000 (18:06 +0300)]
libswscale: Adds conversions from/to float gray format.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agolibavformat/dashdec: Support negative value of the @r attrbute of S in SegmentTimelin...
sanil [Mon, 13 Aug 2018 08:53:59 +0000 (16:53 +0800)]
libavformat/dashdec: Support negative value of the @r attrbute of S in SegmentTimeline element.

The following patch supports parsing negative value of the @r attribute of S in SegmentTimeline element.

Example streams:
1. http://dash.edgesuite.net/dash264/TestCases/1c/qualcomm/1/MultiRate.mpd
2. http://dash.edgesuite.net/dash264/TestCases/1c/qualcomm/2/MultiRate.mpd

5 years agolavfi: add erosion_opencl, dilation_opencl filters
Danil Iashchenko [Sun, 12 Aug 2018 20:12:08 +0000 (23:12 +0300)]
lavfi: add erosion_opencl, dilation_opencl filters

Add erosion_opencl, dilation_opencl filters. Behave like existing erosion and dilation filters.

5 years agoavcodec/mpegaudio_parser: Initialize poutbuf*
Michael Niedermayer [Sun, 5 Aug 2018 12:51:36 +0000 (14:51 +0200)]
avcodec/mpegaudio_parser: Initialize poutbuf*

Possibly fixes: null pointer dereference
Possibly fixes: 9352/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MP3ADUFLOAT_fuzzer-5146068961460224
Fixes: Heap-use-after-free
Fixes: 9453/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MP3ADUFLOAT_fuzzer-5137954375729152
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/ivi: Factor width dereference out of the loops in ivi_output_plane()
Michael Niedermayer [Sat, 4 Aug 2018 00:34:11 +0000 (02:34 +0200)]
avcodec/ivi: Factor width dereference out of the loops in ivi_output_plane()

396078 -> 268468 dezicycles

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/ivi: Only clip samples when needed in ivi_output_plane()
Michael Niedermayer [Sat, 4 Aug 2018 00:31:58 +0000 (02:31 +0200)]
avcodec/ivi: Only clip samples when needed in ivi_output_plane()

435740 -> 396078 dezicycles

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/indeo5: require initial valid intra/gop headers not just later
Michael Niedermayer [Sat, 4 Aug 2018 00:19:15 +0000 (02:19 +0200)]
avcodec/indeo5: require initial valid intra/gop headers not just later

Fixes: Timeout
Fixes: 9308/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO5_fuzzer-5284853581873152
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/microdvddec: limit style characters in parsing
Michael Niedermayer [Sat, 4 Aug 2018 00:56:56 +0000 (02:56 +0200)]
avcodec/microdvddec: limit style characters in parsing

Fixes: Timeout
Fixes: 9293/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MICRODVD_fuzzer-5643972541153280
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agolibavutil: Adds gray floating-point pixel formats.
Sergey Lavrushkin [Fri, 3 Aug 2018 15:02:49 +0000 (18:02 +0300)]
libavutil: Adds gray floating-point pixel formats.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agolavf/mov.c: Set start_time for all streams (in case of edit lists).
Sasi Inguva [Mon, 6 Aug 2018 23:28:50 +0000 (16:28 -0700)]
lavf/mov.c: Set start_time for all streams (in case of edit lists).

Fixes vorbis mp4 audio files, with edit list specified. Since
st->skip_samples is not set in case of vorbis , ffmpeg computes the
start_time as negative.

Signed-off-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agolavfi/vf_libvmaf: update to use libvmaf v1.3.9
Kyle Swanson [Tue, 7 Aug 2018 22:05:16 +0000 (15:05 -0700)]
lavfi/vf_libvmaf: update to use libvmaf v1.3.9

Signed-off-by: Kyle Swanson <kswanson@netflix.com>
5 years agolavc/hevcdec: add ONLY_IF_THREADS_ENABLED where it is missing.
Jun Zhao [Wed, 8 Aug 2018 06:31:27 +0000 (14:31 +0800)]
lavc/hevcdec: add ONLY_IF_THREADS_ENABLED where it is missing.

add ONLY_IF_THREADS_ENABLED where it is missing.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
Reviewed-by: James Almer <jamrial@gmail.com>
5 years agolavfi/selectivecolor: fix neutral color filtering
Clément Bœsch [Thu, 9 Aug 2018 17:22:02 +0000 (19:22 +0200)]
lavfi/selectivecolor: fix neutral color filtering

Neutrals are supposed to be anything not black (0,0,0) and not white
(N,N,N).

Previous neutral filtering code was too strict by excluding colors with
any of its RGB component maxed instead of just the white color.

Reported-by: Royi Avital <royiavital@yahoo.com>
5 years agolavfi/xbr: update filter url
Mina [Wed, 8 Aug 2018 19:49:02 +0000 (21:49 +0200)]
lavfi/xbr: update filter url

Existing link is broken.
This patch updates the existing url with a working one.

Signed-off-by: Mina <minasamy_@hotmail.com>
Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro>
5 years agolavf/mov: Force HEVC codec_id for code-point dvh1 and an hvcC atom.
Carl Eugen Hoyos [Mon, 6 Aug 2018 22:33:40 +0000 (00:33 +0200)]
lavf/mov: Force HEVC codec_id for code-point dvh1 and an hvcC atom.

The mp4 registration authority accepted a code-point for Dolby Vision
HEVC that was already used as a fourcc for DVCPRO 100.

Fixes ticket #7347.

5 years agolibavformat/dashdec: Fix for un-free memory
Colin NG [Wed, 8 Aug 2018 17:27:07 +0000 (17:27 +0000)]
libavformat/dashdec: Fix for un-free memory

Fixes ticket #7338.

5 years agoMAINTAINERS: add myself to MIPS section
Shiyou Yin [Thu, 26 Jul 2018 03:46:23 +0000 (11:46 +0800)]
MAINTAINERS: add myself to MIPS section

Signed-off-by: Shiyou Yin <yinshiyou-hf@loongson.cn>
Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoffmpeg: simplify refcounting packets for the muxing queue
James Almer [Mon, 6 Aug 2018 00:34:14 +0000 (21:34 -0300)]
ffmpeg: simplify refcounting packets for the muxing queue

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavs2: correct avs2 description
hwren [Tue, 7 Aug 2018 10:39:34 +0000 (18:39 +0800)]
avs2: correct avs2 description

Signed-off-by: hwren <hwrenx@126.com>
Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro>
5 years agolavc/libx264: Support monochrome encoding.
Carl Eugen Hoyos [Tue, 7 Aug 2018 18:41:02 +0000 (20:41 +0200)]
lavc/libx264: Support monochrome encoding.

5 years agolibavfilter: Fixes warnings for unused variables in dnn_srcnn.h, dnn_espcn.h, dnn_bac...
Sergey Lavrushkin [Sat, 28 Jul 2018 09:55:02 +0000 (12:55 +0300)]
libavfilter: Fixes warnings for unused variables in dnn_srcnn.h, dnn_espcn.h, dnn_backend_tf.c.

Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
5 years agolibavfilter: Code style fixes for pointers in DNN module and sr filter.
Sergey Lavrushkin [Fri, 27 Jul 2018 16:34:02 +0000 (19:34 +0300)]
libavfilter: Code style fixes for pointers in DNN module and sr filter.

Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
5 years agolibavfilter: Adds on the fly generation of default DNN models for tensorflow backend...
Sergey Lavrushkin [Fri, 27 Jul 2018 16:31:55 +0000 (19:31 +0300)]
libavfilter: Adds on the fly generation of default DNN models for tensorflow backend instead of storing binary model.

Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
5 years agoavformat/flvdec: add flv_full_metadata option into flvdec
Steven Liu [Tue, 7 Aug 2018 07:51:36 +0000 (15:51 +0800)]
avformat/flvdec: add flv_full_metadata option into flvdec

output all the metadata context when use this option.

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
5 years agoavformat/flvdec: reindent code for previous commit
Steven Liu [Tue, 7 Aug 2018 07:50:47 +0000 (15:50 +0800)]
avformat/flvdec: reindent code for previous commit

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
5 years agoavformat/flvdec: add flv_ignore_prevtag option into flvdec
Steven Liu [Tue, 7 Aug 2018 07:48:23 +0000 (15:48 +0800)]
avformat/flvdec: add flv_ignore_prevtag option into flvdec

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
5 years agoavformat/dashdec: remove unused functions and process code
Steven Liu [Tue, 7 Aug 2018 04:37:02 +0000 (12:37 +0800)]
avformat/dashdec: remove unused functions and process code

Based on a patch for hls by Richard Shaffer

Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
5 years agoavformat/dashdec: Fix memleak when resolve_content_path
Jacek Jendrzej [Tue, 7 Aug 2018 03:32:05 +0000 (11:32 +0800)]
avformat/dashdec: Fix memleak when resolve_content_path

Can be reproduced with:  valgrind  --leak-check=full  -v ffmpeg -i
http://yt-dash-mse-test.commondatastorage.googleapis.com/media/motion-20120802-manifest.mpd

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
5 years agoavformat/dashdec: fix for ticket #7336
Jacek Jendrzej [Tue, 7 Aug 2018 03:30:04 +0000 (11:30 +0800)]
avformat/dashdec: fix for ticket #7336

fix for ticket #7336

Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
5 years agofftools/qsv: add extra_hw_frames support
Zhong Li [Wed, 25 Jul 2018 08:05:38 +0000 (16:05 +0800)]
fftools/qsv: add extra_hw_frames support

Currently extra_hw_frames can't be applied to qsv since it
doesn't call function avcodec_get_hw_frames_parameters().

Give an option to fix ticket #7261 though it is not a perfect soultion
(allocate the minimum pool size internally and automatically).

Signed-off-by: Zhong Li <zhong.li@intel.com>
5 years agolavc/qsvenc: expose qp of encoded frames
Zhong Li [Fri, 1 Jun 2018 10:21:28 +0000 (18:21 +0800)]
lavc/qsvenc: expose qp of encoded frames

Requirement from ticket #7254.
Currently only H264 supported by MSDK.

Signed-off-by: Zhong Li <zhong.li@intel.com>
5 years agovf_tonemap: Update hdr metadata with the new peak value
Vittorio Giovara [Wed, 25 Jul 2018 15:45:46 +0000 (17:45 +0200)]
vf_tonemap: Update hdr metadata with the new peak value

Less effective than the approach in vf_tonemap_opencl because there
is no peak detection, but it's still a good idea to implement this.

5 years agovf_tonemap_opencl: Move update_metadata() to a shared file
Vittorio Giovara [Wed, 25 Jul 2018 15:02:45 +0000 (17:02 +0200)]
vf_tonemap_opencl: Move update_metadata() to a shared file

5 years agovf_tonemap[_opencl]: Move determine_signal_peak() to a shared file
Vittorio Giovara [Wed, 25 Jul 2018 14:44:50 +0000 (16:44 +0200)]
vf_tonemap[_opencl]: Move determine_signal_peak() to a shared file

The two functions are identical. Use the shared LumaCoeffients type too.

5 years agovf_tonemap: Fix logic for detecting the maximum peak of untagged sources
Vittorio Giovara [Wed, 25 Jul 2018 15:21:04 +0000 (17:21 +0200)]
vf_tonemap: Fix logic for detecting the maximum peak of untagged sources

When there is no metadata attached to a frame, take into account both
the PQ and HLG transfers, and change the HLG default value to 10:
the value of 12 is the maximum range in scene referred light, but
the reference OOTF maps this from 0 to 1000 cd/m² on the ideal HLG
monitor.

This matches what vf_tonemap_opencl does.

5 years agoavcodec/libaomenc: correct range for cpu-used
Gyan Doshi [Sun, 5 Aug 2018 06:03:45 +0000 (11:33 +0530)]
avcodec/libaomenc: correct range for cpu-used

Valid range is [0,8] as stated in aom.git:aom/aomcx.h

Fixes #7343

5 years agoavcodec/mediacodecdec: fix spurious newline in trace logging
Aman Gupta [Sun, 5 Aug 2018 19:31:07 +0000 (12:31 -0700)]
avcodec/mediacodecdec: fix spurious newline in trace logging

Signed-off-by: Aman Gupta <aman@tmm1.net>
5 years agoavcodec/pnm_parser: Avoid reparsing failed data.
Michael Niedermayer [Sat, 28 Jul 2018 12:09:32 +0000 (14:09 +0200)]
avcodec/pnm_parser: Avoid reparsing failed data.

Alternatively the parser could be re implemented / redesigned so as to better
and more efficiently find frame boundaries

Fixes: Timeout
Fixes: 9210/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PBM_fuzzer-4770771833454592
Fixes: 9214/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PPM_fuzzer-5741633353023488
Fixes: 9219/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGM_fuzzer-6249230237696000
Fixes: 9550/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PAM_fuzzer-5312669836902400
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/simple_idct_template: Fix several integer overflows
Michael Niedermayer [Sat, 28 Jul 2018 10:18:05 +0000 (12:18 +0200)]
avcodec/simple_idct_template: Fix several integer overflows

Fixes: simple_idct_template.c:184:30: runtime error: signed integer overflow: -1065517056 - 1392182838 cannot be represented in type 'int'
Fixes: simple_idct_template.c:269:21: runtime error: signed integer overflow: 16384 * 259254 cannot be represented in type 'int'
Fixes: simple_idct_template.c:164:17: runtime error: signed integer overflow: 21407 * 210162 cannot be represented in type 'int'
Fixes: simple_idct_template.c:167:17: runtime error: signed integer overflow: 21407 * 210162 cannot be represented in type 'int'
Fixes: simple_idct_template.c:169:19: runtime error: signed integer overflow: 22725 * 259190 cannot be represented in type 'int'
Fixes: simple_idct_template.c:171:19: runtime error: signed integer overflow: 19265 * 259190 cannot be represented in type 'int'
Fixes: simple_idct_template.c:173:19: runtime error: signed integer overflow: 12873 * 259190 cannot be represented in type 'int'
Fixes: simple_idct_template.c:183:28: runtime error: signed integer overflow: 1860878336 + 585177665 cannot be represented in type 'int'
Fixes: simple_idct_template.c:159:17: runtime error: signed integer overflow: 16384 * 189520 cannot be represented in type 'int'
Fixes: simple_idct_template.c:170:22: runtime error: signed integer overflow: 19265 * 130147 cannot be represented in type 'int'
Fixes: simple_idct_template.c:174:23: runtime error: signed integer overflow: -22725 * 130147 cannot be represented in type 'int'
Fixes: simple_idct_template.c:183:20: runtime error: signed integer overflow: 16384 * -175206 cannot be represented in type 'int'
Fixes: simple_idct_template.c:184:22: runtime error: signed integer overflow: -16384 * -175206 cannot be represented in type 'int'
Fixes: simple_idct_template.c:185:22: runtime error: signed integer overflow: -16384 * -175206 cannot be represented in type 'int'
Fixes: simple_idct_template.c:186:20: runtime error: signed integer overflow: 16384 * -175206 cannot be represented in type 'int'
Fixes: simple_idct_template.c:195:26: runtime error: signed integer overflow: 19265 * 150747 cannot be represented in type 'int'
Fixes: simple_idct_template.c:198:27: runtime error: signed integer overflow: -22725 * 150747 cannot be represented in type 'int'
Fixes: simple_idct_template.c:184:37: runtime error: signed integer overflow: 21407 * -171941 cannot be represented in type 'int'
Fixes: simple_idct_template.c:185:37: runtime error: signed integer overflow: 21407 * -171941 cannot be represented in type 'int'
Fixes: simple_idct_template.c:192:27: runtime error: signed integer overflow: -12873 * 206341 cannot be represented in type 'int'
Fixes: simple_idct_template.c:185:30: runtime error: signed integer overflow: 1196441600 + 1703756981 cannot be represented in type 'int'
Fixes: simple_idct_template.c:176:23: runtime error: signed integer overflow: -12873 * 168461 cannot be represented in type 'int'
Fixes: simple_idct_template.c:191:27: runtime error: signed integer overflow: -22725 * -140062 cannot be represented in type 'int'
Fixes: simple_idct_template.c:197:26: runtime error: signed integer overflow: 19265 * -140062 cannot be represented in type 'int'
Fixes: simple_idct_template.c:183:34: runtime error: signed integer overflow: 8867 * -243046 cannot be represented in type 'int'
Fixes: simple_idct_template.c:186:34: runtime error: signed integer overflow: 8867 * -243046 cannot be represented in type 'int'
Fixes: simple_idct_template.c:186:28: runtime error: signed integer overflow: -816234496 - 2139878414 cannot be represented in type 'int'
Fixes: simple_idct_template.c:188:26: runtime error: signed integer overflow: 12873 * -239872 cannot be represented in type 'int'
Fixes: simple_idct_template.c:165:16: runtime error: signed integer overflow: 8867 * -260084 cannot be represented in type 'int'
Fixes: simple_idct_template.c:166:16: runtime error: signed integer overflow: 8867 * -260084 cannot be represented in type 'int'
Fixes: 9135/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-6324422955761664
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/aacdec_template: Check for duplicate elements
Michael Niedermayer [Sat, 28 Jul 2018 09:42:37 +0000 (11:42 +0200)]
avcodec/aacdec_template: Check for duplicate elements

Fixes: Timeout
Fixes: 9552/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-6027842339995648
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/aacpsdsp_template: Fix integer overflow in ps_stereo_interpolate_c()
Michael Niedermayer [Sat, 28 Jul 2018 08:59:09 +0000 (10:59 +0200)]
avcodec/aacpsdsp_template: Fix integer overflow in ps_stereo_interpolate_c()

Fixes: signed integer overflow: -1813244069 + -1407981383 cannot be represented in type 'int'
Fixes: 8823/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5643295618236416
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/flvenc: Check audio packet size
Michael Niedermayer [Sat, 28 Jul 2018 13:03:50 +0000 (15:03 +0200)]
avformat/flvenc: Check audio packet size

Fixes: Assertion failure
Fixes: assert_flvenc.c:941_1.swf
Found-by: #CHEN HONGXU# <HCHEN017@e.ntu.edu.sg>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/mediacodecdec: fix SEGV on modern nvidia decoders
Aman Gupta [Tue, 31 Jul 2018 21:33:08 +0000 (14:33 -0700)]
avcodec/mediacodecdec: fix SEGV on modern nvidia decoders

This code came originally from gstreamer, where it was added in [1]
as a work-around for the Tegra 3. (The alignment was changed in [2]
as a response to [3], from 32-bit to 16-bit).

gstreamer only used this workaround in the case where the decoder
didn't return a slice-height property, but when the code was copied
into avcodec the conditional got lost. This commit restores the guard
and prefers the slice-height from the decoder when it is available.

This fixes segfaults decoding 1920x1080 h264 and mpeg2 videos on the
NVidia SHIELD after upgrading to Android Oreo.

[1] https://github.com/GStreamer/gst-plugins-bad/commit/a870e6a5c30dd85240fe75c7409cc1cf1b86541d
[2] https://github.com/GStreamer/gst-plugins-bad/commit/21ff3ae0b0127bd82951d278ca24f2d54133b7cd
[3] https://bugzilla.gnome.org/show_bug.cgi?id=748867

Signed-off-by: Aman Gupta <aman@tmm1.net>
5 years agolavc/svq3: Fix regression decoding some files.
Nikolas Bowe [Tue, 31 Jul 2018 00:22:02 +0000 (17:22 -0700)]
lavc/svq3: Fix regression decoding some files.

Fixes some SVQ3 encoded files which fail to decode correctly after 6d6faa2a2d.
These files exhibit lots of artifacts and logs show "Media key encryption is not implemented".
However they decode without artifacts before 6d6faa2a2d.
The attatched patch allows these files to successfully decode, but also reject media key files.

Tested on the files in #6094 and http://samples.mplayerhq.hu/V-codecs/SVQ3/Vertical400kbit.sorenson3.mov

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/mlp_parser: Check if synccode is within buffer
Michael Niedermayer [Sun, 29 Jul 2018 11:16:37 +0000 (13:16 +0200)]
avcodec/mlp_parser: Check if synccode is within buffer

Fixes: undefined shift
Fixes: 9216/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEHD_fuzzer-6281404575907840
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/qtrle: Check remaining bytestream in qtrle_decode_XYbpp()
Michael Niedermayer [Sun, 29 Jul 2018 10:40:48 +0000 (12:40 +0200)]
avcodec/qtrle: Check remaining bytestream in qtrle_decode_XYbpp()

Fixes: Timeout
Fixes: 9213/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QTRLE_fuzzer-5649753332252672
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/matroskaenc: filter and reorder AV1 OBUs
James Almer [Mon, 23 Jul 2018 15:33:55 +0000 (12:33 -0300)]
avformat/matroskaenc: filter and reorder AV1 OBUs

Make sure to not write forbidden OBUs to CodecPrivate, and do the same with
unnecessary OBUs for packets.

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavformat/av1: reorder OBUs before writting them in ff_isom_write_av1c()
James Almer [Mon, 30 Jul 2018 18:15:43 +0000 (15:15 -0300)]
avformat/av1: reorder OBUs before writting them in ff_isom_write_av1c()

Make sure Sequence Header is first, and only allow one of its kind.

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/av1_parse: return size of the parsed OBU in parse_obu_header()
James Almer [Mon, 30 Jul 2018 18:14:24 +0000 (15:14 -0300)]
avcodec/av1_parse: return size of the parsed OBU in parse_obu_header()

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavformat/av1: return an error when no data is provided to ff_isom_write_av1c()
James Almer [Mon, 23 Jul 2018 16:15:06 +0000 (13:15 -0300)]
avformat/av1: return an error when no data is provided to ff_isom_write_av1c()

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/av1_parse: check for OBU header overread
James Almer [Mon, 23 Jul 2018 16:12:43 +0000 (13:12 -0300)]
avcodec/av1_parse: check for OBU header overread

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/libaomdec: auto insert dump_extra bitstream filter
James Almer [Mon, 23 Jul 2018 15:32:47 +0000 (12:32 -0300)]
avcodec/libaomdec: auto insert dump_extra bitstream filter

Some containers, like Matroska, may propagate key frames with no Sequence
Header OBU since it's provided in extradata instead.
With this change, the Sequence Header will be appended to the packet data
before calling aom_codec_decode().

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/dump_extradata_bsf: don't allocate a new AVPacket per filtered packet
James Almer [Mon, 23 Jul 2018 22:16:30 +0000 (19:16 -0300)]
avcodec/dump_extradata_bsf: don't allocate a new AVPacket per filtered packet

~4x speedup in dump_extradata()

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavformat/avs: add descriptive name and url
Gyan Doshi [Thu, 2 Aug 2018 05:17:10 +0000 (10:47 +0530)]
avformat/avs: add descriptive name and url

AVS now more commonly refers to the Chinese AVS format. This demuxer
processes video files for Creature Shock game

5 years agox86/pixelutils: don't use the AVX2 functions on CPUs known to be slow with them
James Almer [Wed, 1 Aug 2018 01:14:53 +0000 (22:14 -0300)]
x86/pixelutils: don't use the AVX2 functions on CPUs known to be slow with them

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agox86/pixelutils: add missing preprocessor wrapper to the AVX2 functions
James Almer [Wed, 1 Aug 2018 01:03:22 +0000 (22:03 -0300)]
x86/pixelutils: add missing preprocessor wrapper to the AVX2 functions

Should fix compilation with old yasm/nasm

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agotools/qt-faststart: Allow free atoms after moov atom.
Carl Eugen Hoyos [Wed, 11 Jul 2018 23:24:39 +0000 (01:24 +0200)]
tools/qt-faststart: Allow free atoms after moov atom.

5 years agoavutil/pixelutils: sad_32x32 sse2/avx2 optimizations.
Jun Zhao [Mon, 9 Jul 2018 16:41:00 +0000 (00:41 +0800)]
avutil/pixelutils: sad_32x32 sse2/avx2 optimizations.

add ff_pixelutils_sad_32x32_sse2, ff_pixelutils_sad_{a,u}_32x32_sse2,
ff_pixelutils_sad_32x32_avx22, ff_pixelutils_sad_{a,u}_32x32_avx2

use perf record/report profiling, get instructions:u for avx2 sad_32x32:

  72.05%  pixelutils  pixelutils     [.] block_sad_32x32_c
  18.50%  pixelutils  pixelutils     [.] block_sad_16x16_c
   4.78%  pixelutils  pixelutils     [.] block_sad_8x8_c
   2.69%  pixelutils  pixelutils     [.] block_sad_4x4_c
   0.89%  pixelutils  pixelutils     [.] block_sad_2x2_c
   0.16%  pixelutils  pixelutils     [.] ff_pixelutils_sad_32x32_avx2
   0.16%  pixelutils  pixelutils     [.] ff_pixelutils_sad_u_32x32_avx2
   0.12%  pixelutils  pixelutils     [.] ff_pixelutils_sad_a_32x32_avx2

sse2 sad_32x32 instructions:u like:

  71.86%  pixelutils  pixelutils     [.] block_sad_32x32_c
  18.42%  pixelutils  pixelutils     [.] block_sad_16x16_c
   4.81%  pixelutils  pixelutils     [.] block_sad_8x8_c
   2.68%  pixelutils  pixelutils     [.] block_sad_4x4_c
   0.88%  pixelutils  pixelutils     [.] block_sad_2x2_c
   0.29%  pixelutils  pixelutils     [.] ff_pixelutils_sad_32x32_sse2
   0.26%  pixelutils  pixelutils     [.] ff_pixelutils_sad_u_32x32_sse2
   0.23%  pixelutils  pixelutils     [.] ff_pixelutils_sad_a_32x32_sse2

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agolavutil/pixelutils: add sad_32x32 in pixelutils API.
Jun Zhao [Mon, 9 Jul 2018 16:34:26 +0000 (00:34 +0800)]
lavutil/pixelutils: add sad_32x32 in pixelutils API.

add sad_32x32 in pixelutils API, and update the fate.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agoavcodec/h264_mp4toannexb_bsf: use enum constants for the NAL unit type values
James Almer [Sun, 29 Jul 2018 21:22:25 +0000 (18:22 -0300)]
avcodec/h264_mp4toannexb_bsf: use enum constants for the NAL unit type values

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agofate: add tests for audio channel up-/downmixing with pan filter
Tobias Rapp [Thu, 19 Jul 2018 11:59:37 +0000 (13:59 +0200)]
fate: add tests for audio channel up-/downmixing with pan filter

Add tests for upmixing and downmixing with audio channel counts that
have a corresponding default layout and also tests where there is no
default layout.

Update the existing "stereo4" test so it actually outputs stereo like
the other stereo tests. Rename the previous "stereo4" test into
"upmix1".

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
5 years agotests/audiogen: raise channel count limit to 12
Tobias Rapp [Thu, 19 Jul 2018 09:49:33 +0000 (11:49 +0200)]
tests/audiogen: raise channel count limit to 12

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Tobias Rapp <t.rapp@noa-archive.com>
5 years agolibavformat/dashenc: Fix relative URI of HLS master playlist
Antonio Morell [Thu, 26 Jul 2018 13:22:21 +0000 (14:22 +0100)]
libavformat/dashenc: Fix relative URI of HLS master playlist

5 years agodoc/formats: Add documentation for skip_estimate_duration_from_pts
Michael Niedermayer [Tue, 24 Jul 2018 22:49:39 +0000 (00:49 +0200)]
doc/formats: Add documentation for skip_estimate_duration_from_pts

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Gyan Doshi <ffmpeg@gyani.pro>
5 years agoconfigure: add missing aandcttables dependency to asv1 and asv2 encoders
James Almer [Mon, 30 Jul 2018 00:30:00 +0000 (21:30 -0300)]
configure: add missing aandcttables dependency to asv1 and asv2 encoders

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoconfigure: add missing aandcttables dependency to mpegvideoenc
James Almer [Mon, 30 Jul 2018 00:22:28 +0000 (21:22 -0300)]
configure: add missing aandcttables dependency to mpegvideoenc

Also remove the superfluous aandcttables dependency from all the modules
that only need it because of mpegvideoenc

Fixes ticket #7333

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agolavfi/nlmeans: fix aarch64 assembly with clang
Jan Ekström [Thu, 26 Jul 2018 20:45:01 +0000 (23:45 +0300)]
lavfi/nlmeans: fix aarch64 assembly with clang

Clang is more strict about some things.

5 years agocmdutils: print a more descriptive error message in show_help_bsf() when no bsf is...
James Almer [Sat, 28 Jul 2018 03:58:29 +0000 (00:58 -0300)]
cmdutils: print a more descriptive error message in show_help_bsf() when no bsf is specified

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/bitstream_filters: check the input argument of av_bsf_get_by_name() for NULL
James Almer [Sat, 28 Jul 2018 03:51:57 +0000 (00:51 -0300)]
avcodec/bitstream_filters: check the input argument of av_bsf_get_by_name() for NULL

Fixes crashes like "ffmpeg -h bsf" caused by passing NULL to strcmp()

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/diracdec: Check bytes count in else branch in decode_lowdelay() too
Michael Niedermayer [Sun, 22 Jul 2018 19:42:16 +0000 (21:42 +0200)]
avcodec/diracdec: Check bytes count in else branch in decode_lowdelay() too

Fixes: signed integer overflow: 8 * 340018243 cannot be represented in type 'int'
Fixes: 9441/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5194665207791616
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/diracdec: Check slice numbers for overflows in relation to picture dimensions
Michael Niedermayer [Sun, 22 Jul 2018 19:26:24 +0000 (21:26 +0200)]
avcodec/diracdec: Check slice numbers for overflows in relation to picture dimensions

Fixes: signed integer overflow: 88 * 33685506 cannot be represented in type 'int'
Fixes: 9433/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5725943535501312
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/diracdec: Change frame_number to 64bit as its a 32bit from the bitstream...
Michael Niedermayer [Sun, 22 Jul 2018 18:45:39 +0000 (20:45 +0200)]
avcodec/diracdec: Change frame_number to 64bit as its a 32bit from the bitstream and we also have a -1 special case

Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
Fixes: 9291/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-6324345860259840
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/dirac_dwt_template: Fix several integer overflows in horizontal_compose_daub97i()
Michael Niedermayer [Sun, 22 Jul 2018 17:11:04 +0000 (19:11 +0200)]
avcodec/dirac_dwt_template: Fix several integer overflows in horizontal_compose_daub97i()

Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'
Fixes: 8926/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-6047609228623872
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavcodec/diracdec: Prevent integer overflow in intermediate in global_mv()
Michael Niedermayer [Sun, 22 Jul 2018 16:58:34 +0000 (18:58 +0200)]
avcodec/diracdec: Prevent integer overflow in intermediate in global_mv()

Fixes: signed integer overflow: -393471 * 5460 cannot be represented in type 'int'
Fixes: 8890/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-6299775379963904
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/librtmp: fix returning EOF from Read/Write
Timo Rothenpieler [Wed, 25 Jul 2018 22:37:35 +0000 (00:37 +0200)]
avformat/librtmp: fix returning EOF from Read/Write

Ticket #7052

5 years agofate: remove unnecessary reference file for fate-encryption-info
James Almer [Thu, 26 Jul 2018 03:38:01 +0000 (00:38 -0300)]
fate: remove unnecessary reference file for fate-encryption-info

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec: add missing files missed in previous commits
James Almer [Fri, 27 Jul 2018 13:59:38 +0000 (10:59 -0300)]
avcodec: add missing files missed in previous commits

Fixes compilation.

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agolavc, doc, configure: add avs2 video decoder wrapper
hwren [Fri, 27 Jul 2018 03:50:19 +0000 (11:50 +0800)]
lavc, doc, configure: add avs2 video decoder wrapper

Tested-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: hwren <hwrenx@126.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
5 years agolavf: add avs2 fourcc
hwren [Fri, 27 Jul 2018 03:48:50 +0000 (11:48 +0800)]
lavf: add avs2 fourcc

Signed-off-by: hwren <hwrenx@126.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
5 years agolavc: add AVS2/IEEE 1857.4 parser
hwren [Fri, 27 Jul 2018 03:44:59 +0000 (11:44 +0800)]
lavc: add AVS2/IEEE 1857.4 parser

Tested-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: hwren <hwrenx@126.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
5 years agodoc/protocols: documents tcp_mss
Jun Zhao [Sun, 6 May 2018 15:02:42 +0000 (23:02 +0800)]
doc/protocols: documents tcp_mss

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agolavf/tcp: add option to setting Maximum Segment Size
Jun Zhao [Sun, 6 May 2018 14:56:01 +0000 (22:56 +0800)]
lavf/tcp: add option to setting Maximum Segment Size

This can change the the MSS value announced to the other end in
the initial TCP packet, it's can be used when failed Path MTU
discovery.

Signed-off-by: Jun Zhao <mypopydev@gmail.com>
5 years agoswresample/swresample: Fix input channel count in resample_first computation
Michael Niedermayer [Tue, 24 Jul 2018 20:44:12 +0000 (22:44 +0200)]
swresample/swresample: Fix input channel count in resample_first computation

Found-by: Marcin Gorzel <gorzel@google.com>
Reviewed-by: Marcin Gorzel <gorzel@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoavformat/mov: Check default_encrypted_sample before use in mov_read_sample_encryption...
Michael Niedermayer [Sat, 21 Jul 2018 15:20:44 +0000 (17:20 +0200)]
avformat/mov: Check default_encrypted_sample before use in mov_read_sample_encryption_info()

Fixes: 2018-0721-sample
Fixes: null pointer dereference
Found-by: Nikita Knyzhov (knnikita@yandex.ru)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoswresample: Use channel count in rematrix initialization
Marcin Gorzel [Tue, 24 Jul 2018 13:55:47 +0000 (14:55 +0100)]
swresample: Use channel count in rematrix initialization

Rematrixing supports up to 64 channels. However, there is only a limited number of channel layouts defined. Since the in/out channel count is currently obtained from the channel layout, for undefined layouts (e.g. for 9, 10, 11 channels etc.) the rematrixing fails.

This patch changes rematrix init methods to use in (used) and out channel count directly instead of computing it from channel layout.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
5 years agoconfigure: Force pie for Android.
Carl Eugen Hoyos [Wed, 25 Jul 2018 18:43:02 +0000 (20:43 +0200)]
configure: Force pie for Android.

Position-independent executables are required since Lollipop.

Reported-by: Mohammed Bey Ahmed Khernache
5 years agoavutil/hwcontext_d3d11va: fix type arguments passed to IDXGIAdapter2_GetDesc()
James Almer [Mon, 23 Jul 2018 23:42:08 +0000 (20:42 -0300)]
avutil/hwcontext_d3d11va: fix type arguments passed to IDXGIAdapter2_GetDesc()

libavutil/hwcontext_d3d11va.c: In function 'd3d11va_device_create':
libavutil/hwcontext_d3d11va.c:554:46: warning: passing argument 2 of 'pAdapter->lpVtbl->GetDesc' from incompatible pointer type [-Wincompatible-pointer-types]
         hr = IDXGIAdapter2_GetDesc(pAdapter, &desc);
                                              ^
libavutil/hwcontext_d3d11va.c:554:46: note: expected 'DXGI_ADAPTER_DESC * {aka struct DXGI_ADAPTER_DESC *}' but argument is of type 'DXGI_ADAPTER_DESC2 * {aka struct DXGI_ADAPTER_DESC2 *}'

Reviewed-by: Jean-Baptiste Kempf <jb@videolan.org>
Signed-off-by: James Almer <jamrial@gmail.com>