1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-29 22:00:58 +02:00

112767 Commits

Author SHA1 Message Date
Michael Niedermayer
7cc79bfda9
avcodec/mpegvideo_enc: Fix potential overflow in RD
Fixes: CID1500285 Unintentional integer overflow

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b6b2b01025e016ce29e5add57305384a663edcfc)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:21 +02:00
Michael Niedermayer
8174b4206d
avcodec/mpeg4videodec: assert impossible wrap points
Helps: CID1473517 Uninitialized scalar variable
Helps: CID1473497 Uninitialized scalar variable

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8fc649b931a3cbc3a2dd9b50b75a9261a2fb4b49)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:21 +02:00
Michael Niedermayer
94849755fb
avcodec/mpeg12dec: Use 64bit in bit computation
I dont think this can actually overflow but 64bit seems reasonable to use

Fixes: CID1521983 Unintentional integer overflow

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 4c725df059dd9a5f2071e204924105b3ceb74cbc)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:20 +02:00
Michael Niedermayer
d54198256e
avcodec/vqcdec: Check init_get_bits8() for failure
Fixes: CID1516090 Unchecked return value

Sponsored-by: Sovereign Tech Fund
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6a9302739f5b20791eac7f40d9d999f822227fd1)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:20 +02:00
Michael Niedermayer
cc78679c84
avcodec/vble: Check av_image_get_buffer_size() for failure
Fixes: CID1461482 Improper use of negative value

Sponsored-by: Sovereign Tech Fund
Reviewed-.by: "Xiang, Haihao" <haihao.xiang@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit dd5379db5d83d8b06654582afe327daa6be678a3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:20 +02:00
Michael Niedermayer
1b9de6ff28
avcodec/vp3: Replace check by assert
Fixes: CID1452425 Logically dead code

Sponsored-by: Sovereign Tech Fund
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1b991e77b9b19392214f6a788541bea5662de337)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:19 +02:00
Michael Niedermayer
6db10d3be0
avcodec/vp8: Forward return of ff_vpx_init_range_decoder()
Fixes: CID1507483 Unchecked return value

Sponsored-by: Sovereign Tech Fund
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 63feed1519c5e38d6ce146f265c48592236e3abc)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:19 +02:00
Michael Niedermayer
236001ce0b
avcodec/jpeg2000dec: remove ST=3 case
Fixes: CID1460979 Logically dead code

Sponsored-by: Sovereign Tech Fund
Reviewed-by: Tomas Härdin <git@haerdin.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 4ed4f9a6c0a99c823706bfc4bb4df53f963f2f5a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:19 +02:00
Michael Niedermayer
28eb4663d6
avcodec/qsvdec: Check av_image_get_buffer_size() for failure
Fixes: CID1477406 Improper use of negative value

Sponsored-by: Sovereign Tech Fund
Reviewed-by: "Xiang, Haihao" <haihao.xiang@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8789c550faf4587527faf0bd4f6c6c5c64a04ae2)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:18 +02:00
Michael Niedermayer
c10b416087
avcodec/exr: Fix preview overflow
Fixes: CID1515456 Unintentional integer overflow

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 36126e4c142e43cc703f4b8c535d388ac5e403a4)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:18 +02:00
Michael Niedermayer
3ee5567c54
avcodec/decode: decode_simple_internal() only implements audio and video
Fixes: CID1538861 Uninitialized scalar variable

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e9bb586543d83fe0ed901834b853b6d64e327529)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:18 +02:00
Michael Niedermayer
41550b0ebb
avcodec/fmvc: remove dead assignment
Fixes: CID1529220 Unused value

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 96c116254527cc40b386f14b77e17fbe2388d5da)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:17 +02:00
Michael Niedermayer
b586ff2768
avcodec/h2645_sei: Remove dead checks
Fixes: CID1596534 Dereference after null check

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit fdaa6ae2b62de51ac0584b51feec7b2369799549)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:17 +02:00
Michael Niedermayer
61f5019a51
avcodec/h264_slice: Remove dead sps check
Fixes: CID1439574 Dereference after null check

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a68aa951b21b8b7db0a5200bcfebc0a077a5f094)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:17 +02:00
Michael Niedermayer
2de1f26366
avcodec/lpc: copy levenson coeffs only when they have been computed
Fixes: CID1473514 Uninitialized scalar variable

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c2d897f3566fdf5c190583c6f5197ead5abec2ed)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:16 +02:00
Michael Niedermayer
21efa2af53
avutil/tests/base64: Check with too short output array
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c304784a86cc7e2af211ed80ce2121e788680a8e)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:16 +02:00
Michael Niedermayer
f3931154bb
libavutil/base64: Try not to write over the array end
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2d216566f258badd07bc58de1e089b6e4175dc46)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:16 +02:00
Michael Niedermayer
bc08dfdf5d
avcodec/cbs_av1: Avoid shift overflow
Fixes: CID1465488 Unintentional integer overflow

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d7924a4f60f2088de1e6790345caba929eb97030)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:15 +02:00
Michael Niedermayer
cc773eba6b
fftools/ffplay: Check return of swr_alloc_set_opts2()
This probably makes no difference but its more correct

Fixes: CID1503080 Unchecked return value

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f44f44155533822922f6d2f24e5c53c14e432612)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:15 +02:00
Michael Niedermayer
b91b594dbd
tools/opt_common: Check for malloc failure
Fixes: CID1539100 Negative loop bound

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ba7038043a46420bc86b060dbb13b956ea50ac03)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:15 +02:00
Michael Niedermayer
36713f42ab
doc/examples/demux_decode: Simplify loop
Fixes: CID1463550 Logically dead code

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 91d27f7e02e5bec4b6e53cc7a7f15df8be017bb3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:14 +02:00
Michael Niedermayer
ff547f5fd4
avformat/concatdec: Check file
Fixes: null pointer dereference
Fixes: -stream_loop 1 -ss 00:00:05 -i zgclab/ffmpeg_crash/poc2 -codec:v copy -codec:a aac -y output.mp4

Found-by: Wang Dawei and Zhou Geng, from Zhongguancun Laboratory
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a5d1497f33afa17b6a3578b66638e69bf8a558de)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:14 +02:00
Michael Niedermayer
1cb422a0ad
avcodec/mpegvideo_enc: Fix 1 line and one column images
Fixes: Ticket10952
Fixes: poc21ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 96449cfeaeb95fcfd7a2b8d9ccf7719e97471ed1)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:14 +02:00
Michael Niedermayer
e2afcd74ce
avcodec/amrwbdec: assert mode to be valid in decode_fixed_vector()
Inspired-by: CID1473499 Uninitialized scalar variable

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a3bb269db92601e2dc0e99352468d02f7b26c7c2)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:13 +02:00
Michael Niedermayer
5017839ca0
avcodec/wavarc: fix integer overflow in decode_5elp() block type 2
Fixes: signed integer overflow: 2097152000 + 107142979 cannot be represented in type 'int'
Fixes: 67919/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WAVARC_fuzzer-5955101769400320

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a2ec2bd49317ab16a3c30c0824efc580ea9a8aef)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:13 +02:00
Michael Niedermayer
6ed54900f7
swscale/output: Fix integer overflow in yuv2rgba64_full_1_c_template()
Fixes: signed integer overflow: -1082982400 + -1079364728 cannot be represented in type 'int'
Fixes: 67910/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-5329011971522560
The input is 9bit in 16bit, the fuzzer fills all 16bit thus generating "invalid" input
No overflow should happen with valid input.

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1330a73ccadd855542ac4386f75fd72ff0ab5ea1)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:13 +02:00
Michael Niedermayer
e434c789af
swscale/output: Fix integer overflow in yuv2rgba64_1_c_template
Fixes: signed integer overflow: -831176 * 9539 cannot be represented in type 'int'
Fixes: 67869/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-5117342091640832

The input is 9bit in 16bit, the fuzzer fills all 16bit thus generating "invalid" input
No overflow should happen with valid input.

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a56559e688ffde40fcda5588123ffcb978da86d7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:12 +02:00
Michael Niedermayer
c42b520ba5
avcodec/av1dec: Change bit_depth to int
Suggested-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 69b4d9736b0d0ad01c41fcae2d66eaa534b76969)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:12 +02:00
Michael Niedermayer
270ad2fd2f
avcodec/av1dec: bit_depth cannot be another values than 8,10,12
Fixes: CID1544265 Logically dead code

Sponsored-by: Sovereign Tech Fund
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit fd7d24fa3f39fc1013fb0d06b42c98b8ff1f8942)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:12 +02:00
Michael Niedermayer
77d5f217f3
avcodec/avs3_parser: assert the return value of init_get_bits()
Fixes: CID1492867 Unchecked return value

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f9218e4d52e16494ed816651a110dfe0ad22638c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:11 +02:00
Michael Niedermayer
e886fe5542
avcodec/avs2_parser: Assert init_get_bits8() success with const size 15
Fixes: CID1506708 Unchecked return value

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a7c4f119c91bcb3791a3c242ee61a5c60379db4f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:11 +02:00
Michael Niedermayer
19e6b871b6
avformat/mxfdec: Check body_offset
Fixes: signed integer overflow: 538976288 - -9223372036315799520 cannot be represented in type 'long'
Fixes: 68060/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-5523457266745344

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Tomas Härdin <git@haerdin.se>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 20a6bfda0f7c6447ac94611736cee6e9ce6972a0)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:11 +02:00
Michael Niedermayer
115853a821
avformat/kvag: Check sample_rate
Fixes: Division by 0
Fixes: -copyts -start_at_zero -itsoffset 00:00:01 -itsscale 1 -ss 00:00:02  -i zgclab/ffmpeg_crash/poc1 output.mp4

Found-by: Wang Dawei and Zhou Geng, from Zhongguancun Laboratory
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c26a762ea1bf028a33554a5f7a18d8dd7d82f5a8)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:10 +02:00
Michael Niedermayer
e67741feea
avcodec/atrac9dec: Check init_get_bits8() for failure
Fixes: CID1439569 Unchecked return value
Fixes: CID1439578 Unchecked return value

Sponsored-by: Sovereign Tech Fund
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 615c994739cacbeb0a2f48f8271d911fcd0b4303)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:10 +02:00
Michael Niedermayer
b8d75b8ebc
avcodec/ac3_parser: Check init_get_bits8() for failure
Fixes: CID1420393 Unchecked return value

Sponsored-by: Sovereign Tech Fund
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 63415168dbd96475372e37ae0fd47bafe151e2f0)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:10 +02:00
Michael Niedermayer
554787a53e
avcodec/pngdec: Check last AVFrame before deref
Fixes: NULL pointer dereference
Fixes: 68184/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APNG_fuzzer-4926478069334016

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 091fdce87e88c8622d8af89ffa6cbb0dc20c3816)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:09 +02:00
Michael Niedermayer
1f090edd02
avcodec/hevcdec: Check ref frame
Fixes: NULL pointer dereferences
Fixes: 68197/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-6382538823106560

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>
(cherry picked from commit 5eb05f44503da3fdff82f1fed8ee2706d9841a9a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:09 +02:00
Michael Niedermayer
69e12a3f43
doc/examples/qsv_transcode: Initialize pointer before free
Fixees: CID1517023 Uninitialized pointer read

Sponsored-by: Sovereign Tech Fund
Reviewed-by: "Xiang, Haihao" <haihao.xiang@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit cae0f2bc550312c99655057f8ffab5b59556ceeb)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:09 +02:00
Michael Niedermayer
9493a2d066
doc/examples/qsv_transcode: Simplify str_to_dict() loop
Fixes: CID1517022 Logically dead code

Sponsored-by: Sovereign Tech Fund
Reviewed-by: "Xiang, Haihao" <haihao.xiang@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 191950d1bfc3924d1b54f236b2c35149ba4487a1)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:08 +02:00
Michael Niedermayer
f72b41c421
doc/examples/vaapi_transcode: Simplify loop
Fixes: CID1428858(1/2) Logically dead code

Sponsored-by: Sovereign Tech Fund
Reviewed-by: "mypopy@gmail.com" <mypopy@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c9c11a0866d45827201b034349bceb2dc58a3499)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:08 +02:00
Michael Niedermayer
66bcc6463e
doc/examples/qsv_transcode: Simplify loop
Fixes: CID1428858(2/2) Logically dead code

Sponsored-by: Sovereign Tech Fund
Reviewed-by: "Xiang, Haihao" <haihao.xiang@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 82cce209349d2a7c893a4f9691ec8698704b0486)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:08 +02:00
Michael Niedermayer
3d742d20ab
avcodec/cbs_h2645: Check NAL space
Found-by-reviewing: CID1419833 Untrusted loop bound

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b91e3c4c908228901b1ec120d59ddf5a86c3b3b8)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:07 +02:00
Michael Niedermayer
d92ef4f846
avfilter/vf_thumbnail_cuda: Set ret before checking it
Fixes: CID1418336 Logically dead code

Sponsored-by: Sovereign Tech Fund
Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 02301017d28422e4d0a4badb16f2226e70ec534a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:07 +02:00
Michael Niedermayer
057b8d65e3
avfilter/signature_lookup: Dont copy uninitialized stuff around
Fixes: CID1403238 Uninitialized pointer read
Fixes: CID1403239 Uninitialized pointer read

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e7174e66ac6025cea4b8e590525314d3aea6a134)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:07 +02:00
Michael Niedermayer
572985605f
avfilter/signature_lookup: Fix 2 differences to the refernce SW
Fixes: CID1403227 Division or modulo by float zero

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 25cb66369e7b81bd280f0bdd6d51a0e2e11881e3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-05-25 00:31:06 +02:00
Andreas Rheinhardt
ab4fcc06ce avcodec/x86/vp3dsp_init: Set correct function pointer, fix crash
Regression since fd172185580c1ccdcfb90bbfdb59fa806fad3117;
triggered by vp4/KTkvw8dg1J8.avi in the FATE suite, but not
when running fate as this code is not used when the bitexact
flag is set.

Bisecting done by ami_stuff, patch from user Mika Fischer
in ticket #10027 (which this commit fixes).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
(cherry picked from commit c3ca90a92e7211aef8ad1d044518a34f6ba137d7)
2024-05-22 16:53:27 +02:00
Marton Balint
fcce528713 avformat/mp3dec: change bogus error message if read_header encounters EOF
Because of ffio_ensure_seekback() a seek error normally should only happen if
the end of file is reached during checking for the junk run-in. Also use proper
error code.

Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit 49e018d6fee689af6b30b773d83f545d74b8d9aa)
2024-05-21 08:44:07 +02:00
Marton Balint
306ed3f301 avformat/mp3dec: simplify inner frame size check in mp3_read_header
We are protecting the checked buffer with ffio_ensure_seekback(), so if the
inner check fails with a seek error, that likely means the end of file was
reached when checking for the next frame. This could also be the result of a
wrongly guessed (larger than normal) frame size, so let's continue the loop
instead of breaking out early. It will end sooner or later anyway.

Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit b75e604fe5cd7da9ca713f20d1ade18d50319aff)
2024-05-21 08:43:56 +02:00
Marton Balint
b4681bd6ec avformat/mp3dec: only call ffio_ensure_seekback once
Otherwise the subsequent ffio_ensure_seekback calls destroy the buffer of the
earlier. The worst case ~66kB seekback is so small it is easier to request it
entirely.

Fixes ticket #10837, a regression since
0d17f5228f4d3854066ec1001f69c7d1714b0df9.

Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit b0053172199b54a806a4147cda8567a2f1823bc0)
2024-05-21 08:43:51 +02:00
Marton Balint
2aad37688c avutil/thread: fix pthread_setname_np parameters for NetBSD and Apple
Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit 71ea90638efa56b4cd006bfa6cfb464d2169692d)
Signed-off-by: Brad Smith <brad@comstyle.com>
2024-05-19 02:41:11 -04:00