Commit Graph

102993 Commits

Author SHA1 Message Date
Gyan Doshi 3ce272a9da doc/demuxers: note defaults for apng options 2021-06-13 17:07:37 +05:30
Michael Niedermayer 480f11bdd7 avformat/rpl: The associative law doesnt hold for signed integers in C
Add () to avoid undefined behavior
Fixes: signed integer overflow: 9223372036854775790 + 57 cannot be represented in type 'long'
Fixes: 34983/clusterfuzz-testcase-minimized-ffmpeg_dem_RPL_fuzzer-5765822923538432

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-06-12 14:22:42 +02:00
Michael Niedermayer ff56c139e0 avcodec/faxcompr: Check available bits in decode_uncompressed()
Fixes: Timeout
Fixes: 34950/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5686764151898112
Fixes: 34966/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-4587409334468608

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-06-12 14:22:42 +02:00
Michael Niedermayer 7d8421e3d5 avcodec/faxcompr: Check if bits are available before reading in cmode == 9 || cmode == 10
Fixes: Timeout
Fixes: 34950/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5686764151898112

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-06-12 14:22:42 +02:00
Michael Niedermayer ffe4851e23 avformat/utils: Avoid overflow in codec_info_duration computation for subtitles
Fixes: signed integer overflow: 9223126845747118112 - -2594073385365397472 cannot be represented in type 'long'
Fixes: 34936/clusterfuzz-testcase-minimized-ffmpeg_dem_MATROSKA_fuzzer-6739888002170880

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-06-12 14:22:42 +02:00
Michael Niedermayer bf4e7ec825 avformat/utils: check dts/duration to be representable before using them
Fixes: signed integer overflow: 6854513951393103890 + 3427256975738527712 cannot be represented in type 'long'
Fixes: 32936/clusterfuzz-testcase-minimized-ffmpeg_dem_R3D_fuzzer-5236914752978944

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-06-12 14:22:42 +02:00
Michael Niedermayer 3447979d08 avcodec/utils: do "calc from frame_bytes, channels, and block_align" in 64bit
Fixes: signed integer overflow: 104962766 * 32 cannot be represented in type 'int'
Fixes: 33614/clusterfuzz-testcase-minimized-ffmpeg_dem_RSD_fuzzer-6252129036664832

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-06-12 14:22:42 +02:00
Michael Niedermayer dbbcfbcc4e avcodec/ttadata: Add sentinel at the end of ff_tta_shift_1
Fixes: out of array access
Fixes: 34933/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TTA_fuzzer-5629322560929792

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-06-12 14:22:42 +02:00
Michael Niedermayer f54d85cee6 avformat/mov: Check for duplicate mdcv
Fixes: memleak
Fixes: 34932/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5456227658235904

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-06-12 14:22:42 +02:00
Michael Niedermayer 1e24da5cfe avformat/flvdec: Check data before casting
Fixes: -nan is outside the range of representable values of type 'long'
Fixes: signed integer overflow: 1000 * -9223372036854775808 cannot be represented in type 'long'
Fixes: 34890/clusterfuzz-testcase-minimized-ffmpeg_dem_FLV_fuzzer-5334208657620992

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-06-12 14:22:42 +02:00
Shubhanshu Saxena 5509235818 lavfi/dnn: Fill Task using Common Function
This commit adds a common function for filling the TaskItems
in all three backends.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2021-06-12 15:18:58 +08:00
Shubhanshu Saxena 6b961f7409 lavfi/dnn: Use uint8_t for async and do_ioproc in TaskItems
These properties have values either 0 or 1, so using uint8_t
is a better option as compared to int.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2021-06-12 15:18:58 +08:00
Shubhanshu Saxena 9675ebbb91 lavfi/dnn: Add nb_output to TaskItem
Add nb_output property to TaskItem for use in TensorFlow backend
and Native backend.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2021-06-12 15:18:58 +08:00
Shubhanshu Saxena 446b4f77c1 lavfi/dnn: Convert output_name to char** in TaskItem
Convert output_name to char **output_names in TaskItem and use it as
a pointer to array of output names in the DNN backend.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2021-06-12 15:18:58 +08:00
Shubhanshu Saxena f5ab8905fd lavfi/dnn: Extract TaskItem and InferenceItem from OpenVino Backend
Extract TaskItem and InferenceItem from OpenVino backend and convert
ov_model to void in TaskItem.

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2021-06-12 15:18:58 +08:00
Anton Khirnov 580e168a94 lavu/mem: un-inline av_size_mult()
There seems to be no compelling reason for it to be inline.
2021-06-11 19:42:47 +02:00
Anton Khirnov 71c0ef882e lavf: clarify probesize/format_probesize doxy
probesize is not used for probing the input format, but its
documentation claims it does.
2021-06-11 19:42:24 +02:00
Anton Khirnov 5384ee486a doc: fix generating doxy with out-of-tree builds
Broken in 753930bc73, as the path to
Doxyfile passed to doxy-wrapper.sh is relative to the build dir, while
the recipe cd's to the source dir before invoking the wrapper.
2021-06-11 19:28:27 +02:00
stuhlo a501d55905 avcodec/cuviddec: correctly set key_frame with interlaced content
Fixes #9283

This fixes setting of 'key_frame' flag in AVFrame when input h264 packets represents individual fields of interlaced video.
In this case, pairs of two consecutive fields represents a single decoded picture and have identical 'CurrPicIdx', however, only
the first field is entirely intra-coded and has the flag 'intra_pic_flag' set and the second field was resetting the flag before
it was even read in the function 'cuvid_output_frame'.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2021-06-11 16:50:53 +02:00
James Almer 94af6414ab ffmpeg: silence a thread_safe_callbacks deprecation warning
Signed-off-by: James Almer <jamrial@gmail.com>
2021-06-10 21:57:44 -03:00
James Almer ae0863b91d examples/muxing: add missing header
Fixed compilation broken by e67e02d156.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-06-10 21:19:39 -03:00
James Almer 260dc1c5f3 examples/extract_mvs: add missing header
Fixed compilation broken by e67e02d156.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-06-10 21:19:28 -03:00
James Almer 3191bb5c35 examples/demuxing_decoding: add missing header
Fixed compilation broken by e67e02d156.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-06-10 21:19:12 -03:00
James Almer 2cccab96f6 avformat: make AVStream.pts_wrap_bits public
It can be useful to library users, and is currently being used by ffmpeg.c

Suggested-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-06-10 18:37:26 -03:00
Steven Liu 58c908cf94 avfilter/overlay_cuda: support expression of x y position
and add per-frame / init mode for it.

Signed-off-by: Steven Liu <liuqi05@kuaishou.com>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2021-06-10 22:51:43 +02:00
zheng qian f38458089f avformat/mpegtsenc: enable muxing of ARIB captions
Writes a general ARIB stream identifier descriptor, as well
as a data component descriptor which also includes a
pre-defined additional_arib_caption_info structure.

Signed-off-by: zheng qian <xqq@xqq.im>
2021-06-10 23:16:55 +03:00
Anton Khirnov c8778606b3 lavu/video_enc_params: make sure blocks are properly aligned 2021-06-10 16:59:50 +02:00
Anton Khirnov 1256b71ba9 lavf/mp3dec: avoid avcodec.h dependency 2021-06-10 16:51:44 +02:00
Anton Khirnov c9642265f8 lavf/mov_chan: avoid avcodec.h dependency 2021-06-10 16:51:44 +02:00
Anton Khirnov 823ca1ba84 lavf/matroska: avoid avcodec.h dependency 2021-06-10 16:51:44 +02:00
Anton Khirnov f3dafe6a41 lavf/latmenc: avoid avcodec.h dependency 2021-06-10 16:51:44 +02:00
Anton Khirnov e246625b01 lavf/id3v1: drop unnecessary avcodec.h include 2021-06-10 16:51:44 +02:00
Anton Khirnov 5620d18e66 lavf/hevc: drop unnecessary avcodec.h include 2021-06-10 16:51:44 +02:00
Anton Khirnov f79d009b7c lavf/framecrcenc: avoid avcodec.h dependency 2021-06-10 16:51:44 +02:00
Anton Khirnov 239b7d2e40 lavf/adtsenc: avoid avcodec.h dependency 2021-06-10 16:51:44 +02:00
Anton Khirnov e7196afe28 lavf/a64: avoid avcodec.h dependency 2021-06-10 16:51:44 +02:00
Anton Khirnov e67e02d156 lavf/avformat.h: drop the avcodec.h include
Since AVStream.codec is gone, avformat.h does not require anything from
avcodec.h.
2021-06-10 16:51:44 +02:00
Anton Khirnov ed728da3af tools/uncoded_frame: include required headers explicitly 2021-06-10 16:51:44 +02:00
Anton Khirnov 51200769c3 lavf/icoenc: include required headers explicitly 2021-06-10 16:51:44 +02:00
Anton Khirnov c4c6c83421 lavf/internal: include avcodec.h explicitly
Do not depend on avformat.h to provide it.
2021-06-10 16:51:44 +02:00
Anton Khirnov 5d920255aa lavfi/lavfutils: include required headers explicitly 2021-06-10 16:51:44 +02:00
Anton Khirnov c28823ff97 lavc/get_bits: avoid avcodec.h dependency
Include only defs.h, needed for AV_INPUT_BUFFER_PADDING_SIZE.
2021-06-10 16:51:44 +02:00
Anton Khirnov 58a39e3436 lavc/hevc_sei: include buffer.h explicitly
Do not rely on including it indirectly through get_bits.h->avcodec.h
2021-06-10 16:51:44 +02:00
Anton Khirnov 43002487cb lavc/mlp_parse: add required includes explicitly 2021-06-10 16:51:44 +02:00
Anton Khirnov 93822dacb9 lavc/dolby_e_parser: #include avcodec.h explicitly
This file uses definitions from it, but relies on an indirect include
through get_bits.h
2021-06-10 16:51:44 +02:00
Anton Khirnov 9dbdabe0e0 lavc/cbs_internal: clean up headers
Include all required headers explicitly, avoid avcodec.h dependency.
2021-06-10 16:51:44 +02:00
Anton Khirnov e91901adf6 lavc/cbs: avoid avcodec.h dependency
Include only the headers that are actually needed.
2021-06-10 16:51:44 +02:00
Anton Khirnov f3f404edd2 lavc/cbs_bsf.h: explicitly #include all required headers 2021-06-10 16:51:44 +02:00
Anton Khirnov 7c9763070d lavc: move av_get_profile_name() from avcodec.h to codec.h 2021-06-10 16:51:44 +02:00
Anton Khirnov bb3648e676 lavc: move av_get_audio_frame_duration2() from avcodec.h to codec_par.h 2021-06-10 16:51:44 +02:00