Commit Graph

106450 Commits

Author SHA1 Message Date
Anton Khirnov 1dd6363581 fftools/ffprobe: drop -show_format_entry
Deprecated since 2012.
2022-03-22 18:49:43 +01:00
Anton Khirnov 6fd1cd6053 fftools/ffplay: drop options deprecated since 2011 2022-03-22 18:49:43 +01:00
Anton Khirnov 8d293918b5 fftools/ffmpeg: drop mistakenly added empty line 2022-03-22 18:49:43 +01:00
Anton Khirnov 00da464658 fftools: move opt_timelimit from cmdutils to ffmpeg
This option is only supported by ffmpeg.
2022-03-22 18:49:43 +01:00
Anton Khirnov a545cb2b9d fftools/cmdutils: split common option handlers into their own file 2022-03-22 18:49:43 +01:00
Anton Khirnov c99b93c5d5 fftools: drop useless indirection 2022-03-22 18:49:43 +01:00
Anton Khirnov 5e51f5af33 fftools/cmdutils: drop extern declarations for nonexistent variables 2022-03-22 18:49:43 +01:00
Anton Khirnov e46d8c53a3 fftools/cmdutils: drop prototypes for nonexistent functions 2022-03-22 18:49:43 +01:00
Anton Khirnov 1b7ecb3eef avfilter: handle duplicates in the options string
Use the same logic as fftools/cmdutils - when a flag-type option starts
with [+-], append it to the existing value.
2022-03-22 18:49:43 +01:00
Anton Khirnov a0f04433f4 avfilter: simplify processing child context options
THe call to av_opt_set() is redundant, since the option is written in
the options dict, which is later passed to avfilter_init_dict().
2022-03-22 18:49:43 +01:00
Zhao Zhili 303ddab7ea avfilter/video: fix shadowed variable
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2022-03-22 18:49:30 +01:00
Limin Wang 42f1be4461 avformat/movenc: use warning log level and small adjustment for the log
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2022-03-22 23:00:53 +08:00
Limin Wang fc8a6a6f4c avformat/movenc: initialize pts/dts of timecode packet
Fix below error message when timecode packet is written.
"Application provided duration: -9223372036854775808 / timestamp: -9223372036854775808 is out of range for mov/mp4 format"

try to reproduce by:
ffmpeg -y -f lavfi -i color -metadata "timecode=00:00:00:00" -t 1 test.mov

Note although error message is printed, the timecode packet will be written anyway. So
the patch 2/2 will try to change the log level to warning.

Fixes ticket #9488

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2022-03-22 23:00:53 +08:00
James Almer e78173557d ffmpeg: make the ac option set the demuxer's ch_layout AVOption
channels is deprecated on all supported raw demuxers.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-22 08:45:39 -03:00
James Almer 639c2f0049 ffmpeg: add a ch_layout option as an alias to channel_layout
This ensures it's parsed as a CLI option instead of the AVCodecContext AVOption.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-22 08:45:38 -03:00
James Almer bc99e3a9d6 ffmpeg: replace custom channel_layout code with an SpecifierOpt based one
This is cleaner and allows fine tuning which stream the option is applied to.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-22 08:45:38 -03:00
James Almer e6e86a3907 avformat/test/seek: set ch_layout instead of channels
Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-22 08:45:38 -03:00
James Almer edd26bca60 avformat/dfpwmdec: add support to set channel layout
Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-22 08:45:38 -03:00
James Almer e42e54fa4e avformat/pcmdec: add support to set channel layout in sln demuxer
Deprecate the channels option, and ensure ch_layout has priority if set over
channels, until the latter is gone.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-22 08:45:38 -03:00
James Almer 5cd6cb9f05 avformat/pcmdec: deprecate channels option
And ensure ch_layout has priority if set over channels, until the latter is
gone.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-22 08:45:34 -03:00
Paul B Mahol 902ee9cafc avcodec/binkaudio: add support for >2 channels dct codec
As presented in .binka files.
2022-03-22 11:03:03 +01:00
Andreas Rheinhardt fa989df1c6 avcodec/internal: Move FF_DEFAULT_QUANT_BIAS to mpegvideoenc.h
Only used there.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-21 23:25:36 +01:00
Andreas Rheinhardt 86c909558c avcodec/internal: Move FF_SIGNBIT and ff_log2_run to mathops.h
It is a more fitting place for them.
Also move the definition of ff_log2_run to mathtables.c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-21 23:25:36 +01:00
Andreas Rheinhardt 495de744fa avcodec/bitstream: Move code for initializing VLCs to file of its own
bitstream.c is currently the disjoint union of three parts:
The first part is ff_log2_run, the second part are some auxiliary
functions for the PutBits-API; and the third part is the code
for creating VLCs. This commit moves the latter into a file of its own.
This has the advantage of making one of the hacks in tableprint_vlc.h
redundant as vlc.c does not include config.h (whereas the PutBits-API
part does).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-21 23:25:36 +01:00
Andreas Rheinhardt b303f1e083 avcodec/mathops: Move bitswap_32() to its only user
Effectively reverts eaff1aa09e
given that bitswap_32 is no longer used outside of bitstream.c
since 03008c2811.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-21 23:25:36 +01:00
Michael Niedermayer 7aebdb8bf1 avformat/mxfdec: Do not clear array in mxf_read_strong_ref_array() before writing
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-03-21 22:27:14 +01:00
Michael Niedermayer 8d6f49cfc3 avformat/mxfdec: Check for avio_read() failure in mxf_read_strong_ref_array()
Fixes: 42827/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-4900528511909888

Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-03-21 22:27:14 +01:00
Michael Niedermayer 3015c556f3 avformat/mxfdec: Check count in mxf_read_strong_ref_array()
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-03-21 22:27:14 +01:00
Michael Niedermayer dd1ce72e68 avcodec/allcodecs: Dont play with NULLs
Fixes: member access within null pointer of type 'const FFCodec' (aka 'const struct FFCodec')
Fixes: 45726/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6554445419249664

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-03-21 22:27:14 +01:00
Michael Niedermayer 4fdfe430c1 avcodec/av1dec: Check tile_cols
Fixes: division by zero
Fixes: 43769/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AV1_fuzzer-5392562205097984
Fixes: 43950/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AV1_fuzzer-5769210217758720

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-03-21 22:27:14 +01:00
James Almer 6bab6afecc avcodec/wmaprodec: ensure channel count in the private context and decoder context are consistent
avctx->ch_layout will be reinitialized using channel_mask later in the
function.

Fixes: 45736/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMAPRO_fuzzer-5769886813519872

Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-21 16:12:04 -03:00
James Almer 37f4440682 avformat/demux: ensure ch_layout is not lost in the stream's internal avctx
This is a workaround until avcodec_close() stops freeing ch_layout through
av_opt_fre(), or the former is removed.

Fixes a regression since 327efa6633.

Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-21 08:50:28 -03:00
Gyan Doshi 505a7d39cd doc/bitstream_filters: add missing options in h264_metadata 2022-03-21 16:00:02 +05:30
Michael Niedermayer a8fd3f7fab avformat/hls: Check target_duration
Fixes: signed integer overflow: 77777777777777 * 1000000 cannot be represented in type 'long long'
Fixes: 45545/clusterfuzz-testcase-minimized-ffmpeg_dem_HLS_fuzzer-6438101247983616

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-03-21 09:07:58 +01:00
Michael Niedermayer 23e27a360e avcodec/mlpdec: Use 64bit for channel layout
Fixes: shift exponent 33 is too large for 32-bit type 'int'
Fixes: 45645/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEHD_fuzzer-5651350182035456

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-03-21 09:07:58 +01:00
Michael Niedermayer 0c1f20c6c8 avcodec/pixlet: Avoid signed integer overflow in scaling in filterfn()
Fixes: signed integer overflow: 11494 * 1073741824000000 cannot be represented in type 'long'
Fixes: 26586/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PIXLET_fuzzer-5752633970917376

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2022-03-21 09:07:58 +01:00
Andreas Rheinhardt 5aabb2596f avcodec/codec_internal: Rename AVCodecDefault->FFCodecDefault
This structure is no longer declared in a public header,
so using an FF-prefix is more appropriate.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-21 01:33:10 +01:00
Andreas Rheinhardt 20f9727018 avcodec/codec_internal: Add FFCodec, hide internal part of AVCodec
Up until now, codec.h contains both public and private parts
of AVCodec. This exposes the internals of AVCodec to users
and leads them into the temptation of actually using them
and forces us to forward-declare structures and types that
users can't use at all.

This commit changes this by adding a new structure FFCodec to
codec_internal.h that extends AVCodec, i.e. contains the public
AVCodec as first member; the private fields of AVCodec are moved
to this structure, leaving codec.h clean.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-21 01:33:09 +01:00
Andreas Rheinhardt a688f3c13c avcodec/internal: Move FF_CODEC_CAP_* to a new header codec_internal.h
Also move FF_CODEC_TAGS_END as well as struct AVCodecDefault.
This reduces the amount of files that have to include internal.h
(which comes with quite a lot of indirect inclusions), as e.g.
most encoders don't need it. It is furthemore in preparation
for moving the private part of AVCodec out of the public codec.h.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-21 01:33:09 +01:00
Marton Balint 5b3732227e avfilter/x86/vf_blend: use unaligned movs for output
Fixes crashes with:

ffmpeg -f lavfi -i allyuv=d=1 -vf tblend=difference128,pad=5000:ih:1 -f null x

Signed-off-by: Marton Balint <cus@passwd.hu>
2022-03-21 00:50:44 +01:00
Zhao Zhili 117672c814 ffplay: don't shadow global variable
Signed-off-by: Marton Balint <cus@passwd.hu>
2022-03-21 00:48:30 +01:00
Zhao Zhili 269ed0a413 ffplay: check AVFMT_NO_BYTE_SEEK flag for seek_by_bytes
Signed-off-by: Marton Balint <cus@passwd.hu>
2022-03-21 00:48:30 +01:00
Zhao Zhili 92053aa260 avformat/hls: add AVFMT_NO_BYTE_SEEK flag
After d6ac6650b9, ffplay failed to seek HLS stream with AVSEEK_FLAG_BYTE
enabled by default.

Signed-off-by: Marton Balint <cus@passwd.hu>
2022-03-21 00:48:30 +01:00
James Almer efdde028bb avcodec/opus: always use ambisonic layout for mapping family 2
No need to use a Custom layout when the non diegetic channels can be
described as a standard mask.

This fixes:

45684/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBOPUS_fuzzer-5039410989629440

Signed-off-by: James Almer <jamrial@gmail.com>
2022-03-20 19:23:12 -03:00
Anton Khirnov a24e6ca8bf lavc/bsf: improve doxy 2022-03-19 15:59:58 +01:00
Anton Khirnov 5e7643eff7 lavc/bsf: add general documentation
Also, place the BSF api docs in their own doxygen group.
2022-03-19 15:59:07 +01:00
Anton Khirnov 6ccc3989d1 doc/APIchanges: update for the new channel layout API 2022-03-19 15:55:51 +01:00
Pierre-Anthony Lemieux 2a1eae2179
avformat/concat: refactor to use ff_rescale_interval()
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2022-03-19 21:34:08 +10:00
Pierre-Anthony Lemieux f409c78517
avformat/imf: refactor to use ff_rescale_interval()
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2022-03-19 21:34:06 +10:00
Pierre-Anthony Lemieux 8744b103da
avformat/tests: add test for ff_rescale_interval()
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
2022-03-19 21:34:04 +10:00