Anton Khirnov
ff55d1cc20
fftools/ffmpeg_dec: improve detection of lavf-guessed durations
...
Will be useful in following commit.
2024-07-09 11:14:08 +02:00
Andreas Rheinhardt
b6c43328ee
avformat/matroskaenc: Avoid indirection via st->codecpar
...
Use the already available AVCodecParameters pointer instead.
Shortens lines.
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-07-08 20:11:32 +02:00
Andreas Rheinhardt
0d1bc9666c
avformat/matroskaenc: Only write useful cropping values
...
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-07-08 20:11:27 +02:00
Andreas Rheinhardt
9ffac78eba
avformat/matroskaenc: Fix and simplify check for invalid crop values
...
The check "left >= INT_MAX - right" is supposed to check for
whether left + right does not overflow/wraparound, but given that
left and top are uint32_t INT_MAX - right can already wraparound
for big values of right (and ordinary 32-bit ints):
If right == UINT32_MAX, INT_MAX - right is INT_MAX + 1;
for left in 0..par->width both checks will be passed.
Fix this and simplify the check by using 64-bit types,
where the addition is guaranteed not to overflow.
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-07-08 20:11:20 +02:00
Andreas Rheinhardt
8765b36a52
avformat/matroskaenc: Fix potential stack-buffer-overflow
...
Forgotten in f194f291d8082134cdce625b0ca3548067428ea9
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-07-08 20:11:03 +02:00
James Almer
bf87688a9f
fftools/ffmpeg: support applying container level cropping
...
Signed-off-by: James Almer <jamrial@gmail.com>
2024-07-08 13:30:24 -03:00
James Almer
f194f291d8
avformat/matroskaenc: support writing cropping values
...
Signed-off-by: James Almer <jamrial@gmail.com>
2024-07-08 13:30:24 -03:00
James Almer
79e8e980c2
avformat/matroskadec: export cropping values
...
Signed-off-by: James Almer <jamrial@gmail.com>
2024-07-08 13:30:24 -03:00
James Almer
dc763efe70
avformat/matroskadec: don't infer display dimensions when DisplayUnit is not pixels
...
The spec doesn't define a default value for other values of DisplayUnit.
Signed-off-by: James Almer <jamrial@gmail.com>
2024-07-08 13:30:24 -03:00
James Almer
d570457eb7
ffprobe: print Frame Cropping packet side data info
...
Signed-off-by: James Almer <jamrial@gmail.com>
2024-07-08 13:30:24 -03:00
James Almer
893c6802ac
avformat/dump: print Frame Cropping packet side data info
...
Signed-off-by: James Almer <jamrial@gmail.com>
2024-07-08 13:29:49 -03:00
James Almer
1b58f3af30
avcodec/packet: add a decoded frame cropping side data type
...
Signed-off-by: James Almer <jamrial@gmail.com>
2024-07-08 13:23:33 -03:00
Michael Niedermayer
0619138639
avformat/usmdec: Initialize value
...
Fixes: CID1551685 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-07 23:36:33 +02:00
Michael Niedermayer
7b2f67ea77
avformat/udp: Fix temporary buffer race
...
Fixes: CID1551679 Data race condition
Fixes: CID1551687 Data race condition
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-07 23:36:33 +02:00
Michael Niedermayer
f022afea77
avformat/tls_schannel: Initialize ret
...
Fixes: CID1591881 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-07 23:36:32 +02:00
Michael Niedermayer
426d8c84c3
avformat/subfile: Assert that whence is a known case
...
This may help CID1452449 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-07 23:36:32 +02:00
Michael Niedermayer
2a0a7d964b
avformat/subfile: Merge if into switch()
...
Found while reviewing CID1452449 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-07 23:36:32 +02:00
Michael Niedermayer
c8200d3825
avformat/rtsp: Check that lower transport is handled in one of the if()
...
Fixes: CID1473554 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-07 23:36:31 +02:00
Michael Niedermayer
498ce4e8b8
avformat/rtsp: initialize reply1
...
It seems reply1 is initialized by ff_rtsp_send_cmd() in most cases but there
are code paths like "continue" which look like they could skip it but even if not
writing this so a complex loop after several layers of calls initialized a local
variable through a pointer is just bad design.
This patch simply initialized the variable.
Fixes: CID1473532 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-07 23:36:31 +02:00
Michael Niedermayer
9bb38ba2b7
avformat/rtsp: use < 0 for error check
...
Found while reviewing CID1473532 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-07 23:36:31 +02:00
Michael Niedermayer
7a9ddb7051
avformat/rtpenc_vc2hq: Check sizes
...
Fixes: CID1452585 Untrusted loop bound
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-07 23:36:30 +02:00
Michael Niedermayer
382e9e79f3
avfilter/af_aderivative: Free out on error
...
Fixes: CID1197065 Resource leak
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-07 23:36:30 +02:00
Michael Niedermayer
66b60bae68
swscale/swscale: Use ptrdiff_t for linesize computations
...
This is unlikely to make a difference
Fixes: CID1591896 Unintentional integer overflow
Fixes: CID1591901 Unintentional integer overflow
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-07 23:36:30 +02:00
Michael Niedermayer
62d4414d54
avfilter/af_amerge: Cleanup on av_channel_layout_copy() failure
...
Fixes: CID1503088 Resource leak
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-07 23:36:29 +02:00
Michael Niedermayer
a5c815f937
avfilter/af_afir: Assert format
...
Maybe helps: CID1516805 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-07 23:36:29 +02:00
Michael Niedermayer
8f9a6c4ea8
avfilter/af_afftdn: Assert format
...
Maybe helps: CID1515514 Uninitialized scalar variable
Maybe helps: CID1515517 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-07 23:36:29 +02:00
Michael Niedermayer
5fe8bf4aa5
avfilter/af_pan: check nb_output_channels before use
...
Fixes: CID1500281 Out-of-bounds write
Fixes: CID1500331 Out-of-bounds write
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-07 23:36:28 +02:00
Michael Niedermayer
2d0d502ff1
avfilter/af_mcompand: compute half frequency in double
...
Fixes: CID1422217 Result is not floating-point
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-07 23:36:28 +02:00
Michael Niedermayer
cef720ab42
avfilter/af_channelsplit: Assert that av_channel_layout_channel_from_index() succeeds
...
Maybe Helps: CID1503077 Bad bit shift operation
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-07 23:36:28 +02:00
Michael Niedermayer
7a0ea15c7a
avfilter/af_aresample: Cleanup on av_channel_layout_copy() failure
...
Fixes: CID1503078 Resource leak
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-07 23:36:27 +02:00
Michael Niedermayer
380a8213b1
tools/coverity: Phase 1 study of anti-halicogenic for coverity av_rescale()
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-07 23:36:27 +02:00
Fei Wang
7ba8982181
MAINTAINERS: add myself to the general developers list
...
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2024-07-07 23:36:27 +02:00
James Almer
33d6e14d6f
avformat/hevc: reindent after previous commits
...
Signed-off-by: James Almer <jamrial@gmail.com>
2024-07-07 13:54:07 -03:00
James Almer
aa8230c7ba
avformat/movenc: add support for writting hfov boxes
...
Signed-off-by: James Almer <jamrial@gmail.com>
2024-07-07 12:38:57 -03:00
James Almer
6a428876fc
avformat/movenc: add support for writting vexu boxes
...
Signed-off-by: James Almer <jamrial@gmail.com>
2024-07-07 12:38:57 -03:00
James Almer
d4e2af4144
avformat/movenc: add support for writing lhvC boxes
...
Signed-off-by: James Almer <jamrial@gmail.com>
2024-07-07 12:38:57 -03:00
Derek Buitenhuis
c4ebdd8d2d
avformat/mov: Mark streams with a layered HEVC box as multilayer
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-07-07 12:38:57 -03:00
James Almer
c657c694e3
avformat/mov: add support for lhvC box parsing
...
Signed-off-by: James Almer <jamrial@gmail.com>
2024-07-07 12:38:57 -03:00
James Almer
cbfbacff20
avformat/hevc: add a function to write a lhvC box
...
Signed-off-by: James Almer <jamrial@gmail.com>
2024-07-07 12:38:57 -03:00
James Almer
cee43e512d
avformat/hevc: store parameter set and layer IDs in HVCCNALUnit
...
Signed-off-by: James Almer <jamrial@gmail.com>
2024-07-07 12:38:57 -03:00
James Almer
361b01329f
avformat/hevc: use a single array for per-PS NALUs
...
Signed-off-by: James Almer <jamrial@gmail.com>
2024-07-07 12:38:57 -03:00
James Almer
ab7893a7b1
avformat/hevc: don't write the same array values per nal addition
...
Signed-off-by: James Almer <jamrial@gmail.com>
2024-07-07 12:38:57 -03:00
James Almer
a696b28886
avformat/hevc: don't write NALUs with nuh_layer_id > 0 in hvcC boxes
...
Signed-off-by: James Almer <jamrial@gmail.com>
2024-07-07 12:38:57 -03:00
Derek Buitenhuis
46f7ea4456
avformat: Add a new stream disposition for multilayer video
...
This lets us detect when a container has flagged a stream as multilayer.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-07-07 12:38:50 -03:00
Hao Guan
cd2f8a22e9
avcodec/videotoolboxenc: fix vtctx reset condition
...
In vtenc_populate_extradata, the cleanup function vtenc_reset should not
be used when no error occurs, otherwise some color information is lost
(#11036 ).
This patch checks the status code and conducts the correct cleanup.
Signed-off-by: Hao Guan <hguandl@gmail.com>
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2024-07-07 18:46:02 +08:00
Anton Khirnov
24b3bad811
tests/fate/mov: add a test for VFR muxing
2024-07-07 11:37:43 +02:00
Anton Khirnov
ef521e7a57
lavf/movenc: mark mov/mp4 as supporting VFR
2024-07-07 11:37:43 +02:00
Anton Khirnov
6cde03739e
tests/fate/filter-audio: convert atempo test to oneoff
...
Filter output is not bitexact.
2024-07-07 11:34:13 +02:00
Marth64
8b8ee799de
avformat/dvdvideodec: Remove unused cell count variable
...
Signed-off-by: Marth64 <marth64@proxyid.net>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2024-07-07 11:33:32 +02:00
Rémi Denis-Courmont
f9d1230224
lavc/h264dsp: R-V V 8-bit h264_idct8_add
...
T-Head C908 (cycles):
h264_idct8_add_8bpp_c: 1072.0
h264_idct8_add_8bpp_rvv_i32: 318.5
2024-07-07 09:34:32 +03:00