Commit Graph

22754 Commits

Author SHA1 Message Date
vvtest
e022934105
ffmpeg升级
Signed-off-by: vvtest <815508462@qq.com>
2024-01-24 09:12:57 +00:00
zhenghongda
d0034f47da [ICSL] Judge the input parameters to ensure the legality of the parameters.
Signed-off-by: zhenghongda <zhenghongda4@huawei.com>
2024-01-03 10:14:09 +08:00
zhenghongda
79d20907c4 mpegts supports parsing drm descriptor and CEI information and storing it in side data.
Signed-off-by: zhenghongda <zhenghongda4@huawei.com>
2023-12-29 10:05:05 +08:00
openharmony_ci
7f0281c643
!122 修改以metadata方式支持HDRVivid的cuvv
Merge pull request !122 from kevin-cl/master
2023-11-07 11:05:24 +00:00
Bojack
db6d078f45 revert avs3da
Signed-off-by: Bojack <yangjunhui_job@163.com>
2023-10-19 17:46:48 +08:00
openharmony_ci
5898c6f531
!128 avs3da解封装支持&源码修改增加编译宏
Merge pull request !128 from Bojack/audiovivid
2023-10-19 01:56:13 +00:00
gg0907
2142b091ab wav/mp3 get GBK tag Signed-off-by: gg0907<guohui_1701@163.com>
Signed-off-by: gg0907 <guohui_1701@163.com>
Change-Id: I54d42b6feac0c0d853d8dc607b386e3318ed490e
2023-10-18 11:09:42 +08:00
Bojack
d6d4296ac8 fix avs3da
Signed-off-by: Bojack <yangjunhui_job@163.com>
2023-10-17 11:18:59 +08:00
Bojack
16427215dd fix macro
Signed-off-by: Bojack <yangjunhui_job@163.com>
2023-10-17 10:56:00 +08:00
Bojack
49f9377568 fix macro
Signed-off-by: Bojack <yangjunhui_job@163.com>
2023-10-17 10:51:29 +08:00
Bojack
9e02fb015c fix avs3da macro
Signed-off-by: Bojack <yangjunhui_job@163.com>
2023-10-16 16:56:39 +08:00
Bojack
e37624641e support avs3da
Signed-off-by: Bojack <yangjunhui_job@163.com>
2023-10-16 16:33:21 +08:00
Bojack
9c810d7be8 support amr
Signed-off-by: Bojack <yangjunhui_job@163.com>
2023-10-13 18:53:10 +08:00
kevin-cl
3038efe57a 调整cuva信息的获取方式
Signed-off-by: kevin-cl <caileitoday@163.com>
2023-10-13 08:08:56 +08:00
kevin-cl
97048608ae 调整hdr_vivid的传递方式
Signed-off-by: kevin-cl <caileitoday@163.com>
2023-10-12 19:30:38 +08:00
openharmony_ci
e399f6c63a
回退 'Pull Request !117 : HDR Vivid视频封装mp4的支持' 2023-10-12 07:23:06 +00:00
openharmony_ci
47f0fbd18d
回退 'Pull Request !119 : 回退 'Pull Request !117 : HDR Vivid视频封装mp4的支持'' 2023-10-12 07:21:18 +00:00
openharmony_ci
180dcb91bb
回退 'Pull Request !117 : HDR Vivid视频封装mp4的支持' 2023-10-12 07:13:47 +00:00
kevin-cl
aab5032540 增加HDR Vivid编译宏
Signed-off-by: kevin-cl <caileitoday@163.com>
2023-10-10 20:46:43 +08:00
kevin-cl
b16e31f3d3 添加mp4封装HDR Vivid的cuvv信息
Signed-off-by: kevin-cl <caileitoday@163.com>
2023-09-28 15:02:34 +08:00
gg0907
e6aa1760f0 fix seek failed
Signed-off-by: gg0907 <guohui_1701@163.com>
2023-06-10 16:12:16 +08:00
gg0907
d722e1779f fix CVE-2022-3341
Signed-off-by: gg0907 <guohui_1701@163.com>
2023-01-11 10:32:06 +08:00
gg0907
6493e3aeb0
aac seek
Signed-off-by: gg0907 <guohui_1701@163.com>
2022-12-06 12:49:43 +00:00
Coprinus
ef8984a88d
fix duration not accurate in .aac
Signed-off-by: Coprinus <438124924@qq.com>
2022-09-16 11:45:19 +00:00
Coprinus
292437cad7
fix duration not accurate in .aac
Signed-off-by: Coprinus <438124924@qq.com>
2022-09-16 08:48:12 +00:00
Coprinus
0f21d457b0
fix duration not accurate in .aac
Signed-off-by: Coprinus <438124924@qq.com>
2022-09-15 12:09:38 +00:00
laohuys2020
4870f4762d add 3da support in ffmpeg
Signed-off-by: laohuys2020 <170323542@qq.com>
2022-08-03 09:14:03 +08:00
gg0907
65994f5530 upgrade to 4.4.1
Signed-off-by: gg0907 <guohui_1701@163.com>
2022-05-23 11:23:35 +08:00
gg0907
28f9b7daac 1、fix cve 2、add version 3、modify version in README.OpenSource 4、delete avconfig.h and ffversion
Signed-off-by: gg0907 <guohui_1701@163.com>
2022-04-01 13:58:26 +08:00
gg0907
3786ef72b5 ffmpeg upgrade to 4.3.2
Signed-off-by: gg0907 <guohui_1701@163.com>
2022-03-31 16:02:22 +08:00
appoe
60dbd8db02 [PATCH][CVE-2020-35964]avformat/vividas: improve extradata packing checks in track_header()
Signed-off-by: appoe <1029040451@qq.com>
2021-11-04 07:35:35 +00:00
appoe
9a5ea0cc02 fix musl build
Signed-off-by: appoe <1029040451@qq.com>
2021-07-30 08:18:37 +00:00
Andreas Rheinhardt
9ee65bf88d avformat/sdp: Fix potential write beyond end of buffer
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit 5d91b7718efc581da8882a4e9bf2f5953e41adbf)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-07-10 20:52:00 +02:00
Andreas Rheinhardt
be84216c53 avformat/mm: Check for existence of audio stream
No audio stream is created unconditionally and if none has been created,
no packet with stream_index 1 may be returned. This fixes an assert in
ff_read_packet() in libavformat/utils reported in ticket #8782.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit ec59dc73f0cc8930bf5dae389cd76d049d537ca7)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-07-10 20:52:00 +02:00
Zhao Zhili
d4ced9ebb7 avformat/mov: Fix unaligned read of uint32_t and endian-dependance in mov_read_default
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 806a4d5187aeb82b97898683242886ed1e84f894)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-09 12:35:39 +02:00
Michael Niedermayer
99eb08f390 avformat/smjpegdec: Check the existence of referred streams
Fixes: Assertion failure
Fixes: 23758/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5160954605338624.fuzz

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 321ea59dac6538f92206bab0a2688fa24a25c4d2)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-09 12:35:39 +02:00
Michael Niedermayer
3571d9d654 avformat/utils: reorder duration computation to avoid overflow
Fixes: signed integer overflow: 8 * 9223372036854774783 cannot be represented in type 'long'
Fixes: 23381/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-4818340509122560

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 10cc82c35baabbb07ffec3faccb04d8928c39e4c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-02 10:20:36 +02:00
Michael Niedermayer
a3fdeb0c3a avformat/hls: Pass a copy of the URL for probing
The segments / url can be modified by the io read when reloading

This may be an alternative or additional fix for Ticket8673
as a further alternative the reload stuff could be disabled during
probing

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b5e39880fb7269b1b3577cee288e06aa3dc1dfa2)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-02 10:20:36 +02:00
Michael Niedermayer
c05d51c067 avformat/mvdec: Fix integer overflow with billions of channels
Fixes: signed integer overflow: 1394614304 * 2 cannot be represented in type 'int'
Fixes: 23491/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5697377020411904

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 b6fbbe08c325415cc784df296058beb6604f0b9c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-02 10:20:36 +02:00
Michael Niedermayer
3ce81bf960 avformat/microdvddec: skip malformed lines without frame number.
Fixes: signed integer overflow: 1 - -9223372036854775808 cannot be represented in type 'long'
Fixes: 23490/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5133490093031424

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a8fb7612a97530bdd0b2549dacf91dcf71a3187a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-07-02 10:20:36 +02:00
Zhao Zhili
143e2d0d66 avformat/mov: fix memleaks
Fix two cases of memleaks:
1. The leak of dv_demux
2. The leak of dv_fctx upon dv_demux allocate failure

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit f3dc38a186b2326ce03e50969897ea703817ddb0)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-07-01 19:02:29 +02:00
Andreas Rheinhardt
7c1ad9d151 libavformat/mov: Fix memleaks when demuxing DV audio
The code for demuxing DV audio predates the introduction of refcounted
packets and when the latter was added, changes to the former were
forgotten. This meant that when avpriv_dv_produce_packet initialized the
packet containing the AVBufferRef, the AVBufferRef as well as the
underlying AVBuffer leaked; the actual packet data didn't leak: They
were directly freed, but not via their AVBuffer's free function.

https://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket4671/dir1.tar.bz2
contains samples for this (enable_drefs needs to be enabled for them).

Moreover, errors in avpriv_dv_produce_packet were ignored; this has been
changed, too.

Furthermore, in the hypothetical scenario that the track has a palette,
this would leak, too, so reorder the code so that the palette code
appears after the DV audio code.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit 61f5c6ab06fc61e0f9f8f8dab5595b8bb202df73)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-07-01 19:01:56 +02:00
Andreas Rheinhardt
3cf212f6c8 avformat/avc, mxfenc: Avoid allocation of H264 SPS structure, fix memleak
Up until now, ff_avc_decode_sps would parse a SPS and return some
properties from it in a freshly allocated structure. Yet said structure
is very small and completely internal to libavformat, so there is no
reason to use the heap for it. This commit therefore changes the
function to return an int and to modify a caller-provided structure.
This will also allow ff_avc_decode_sps to return better error codes in
the future.

It also fixes a memleak in mxfenc: If a packet contained multiple SPS,
only the SPS structure belonging to the last SPS would be freed, the
other ones would leak when the pointer is overwritten to point to the
new SPS structure. Of course, without allocations there are no leaks.
This is Coverity issue #1445194.

Furthermore, the SPS structure has been renamed from
H264SequenceParameterSet to H264SPS in order to avoid overlong lines.

Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit a0b6df0a3953e2586e63f513485c4d2d42507d7f)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-07-01 19:00:19 +02:00
Andreas Rheinhardt
d8407afe02 avformat/aviobuf: Also return truncated buffer in avio_get_dyn_buf()
Two kinds of errors can happen when working with dynamic buffers:
(Re)allocation errors or truncation errors (one has to truncate the
buffer to a size of INT_MAX because avio_close_dyn_buf() and
avio_get_dyn_buf() both return an int). Right now, avio_get_dyn_buf()
returns an empty buffer in either case. But given that
avio_get_dyn_buf() does not destroy the dynamic buffer, one can return
the buffer in case of truncation and let the user check the error flags
and decide for himself instead of hardcoding a single way to proceed
in case of truncation.

(This actually restores the behaviour from before commit
163bb9ac0af495a5cb95441bdb5c02170440d28c.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit c33e56c7a6a8bef7d95e1d36eb2f35748d475695)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-07-01 18:59:27 +02:00
Andreas Rheinhardt
b6546add07 avformat/aviobuf: Don't check for overflow after it happened
If adding two ints overflows, it doesn't matter whether the result will
be stored in an unsigned or not; and checking afterwards does not make it
retroactively defined.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit 28a078eded1c29985ed078b59d48ff59cf00394b)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-07-01 18:58:10 +02:00
Andreas Rheinhardt
716b5c6ec9 avformat/mov: Fix reel_name size check
Only read str_size bytes from offset 30 of extradata if the extradata is
indeed at least 30 + str_size bytes long.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit ff3fad6b0edb13dd664403b01bc00309f035b110)
2020-06-15 17:30:33 +02:00
Andreas Rheinhardt
9d921e38f4 avformat/mov: Fix memleak upon encountering repeating tags
mov_read_custom tries to read three strings belonging to three different
tags. When an already encountered tag is encountered again, a new buffer
for the string to be read is allocated and stored in the pointer
destined for this particular tag. But in this scenario, said pointer
already holds the address of the string read earlier, leading to a leak.

This commit therefore aborts the reading process upon encountering
an already encountered tag.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit dfef1d5e3cd4dfead84416a01e6c9ff0da50b34d)
2020-06-15 17:30:33 +02:00
Andreas Rheinhardt
c49dfee90b avformat/matroskaenc: Don't use NULL for %s format string
The argument pertaining to a printf %s conversion specifier must not
be NULL, even if the precision (i.e. the number of characters to write)
is zero. If it is NULL, it is undefined behaviour.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit 6de6ce7bc80e874099895b6c73977bc2efb06a4d)
2020-06-15 17:30:33 +02:00
Andreas Rheinhardt
3f3cfddb37 avformat/webvttdec: Fix memleak upon read header failure
The already parsed subtitles (contained in an FFDemuxSubtitlesQueue)
would leak if an error happened upon reading a subsequent subtitle.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit c784fe8b867e42a1c8d2c48d7046e3e0cce7ec31)
2020-06-15 17:30:33 +02:00
Andreas Rheinhardt
b7897f0319 avformat/vplayerdec: Fix memleak upon read header failure
The already parsed subtitles (contained in an FFDemuxSubtitlesQueue)
would leak if an error happened upon reading a subsequent subtitle.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit 67434afa7fcb2b411b10a4d09fb30cd3a5907c2c)
2020-06-15 17:30:33 +02:00