Andreas Rheinhardt
57b5ec6ba7
avcodec/avcodec: Stop including bsf.h in avcodec.h
...
Also include bsf.h directly wherever it is used.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-07-22 11:14:16 +02:00
Andreas Rheinhardt
1500b7dfa5
avformat/av1dec: Simplify cleanup after read_header failure
...
by setting the FF_FMT_INIT_CLEANUP flag.
Reviewed-by: James Almer <jamrial@gmail.com >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2021-07-07 21:40:13 +02:00
James Almer
b9c5fdf602
avformat: move AVStream.{parser,need_parsing} to AVStreamInternal
...
Those are private fields, no reason to have them exposed in a public
header.
Signed-off-by: James Almer <jamrial@gmail.com >
2021-05-07 09:27:21 -03:00
Andreas Rheinhardt
bc70684e74
avformat: Constify all muxer/demuxers
...
This is possible now that the next-API is gone.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
Signed-off-by: James Almer <jamrial@gmail.com >
2021-04-27 11:48:06 -03:00
Michael Niedermayer
76b6c46a81
avformat/av1dec: check size before addition in probing
...
Fixes: signed integer overflow: 175 + 2147483571 cannot be represented in type 'int'
Fixes: 26833/clusterfuzz-testcase-minimized-ffmpeg_dem_IMAGE2_fuzzer-5969501214212096
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-12-06 21:00:03 +01:00
Michael Niedermayer
2be51d14f2
avformat/av1dec: Fix padding in obu_get_packet()
...
Fixes: stack buffer overflow (read)
Fixes: 26369/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-5721057325219840
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2020-10-20 15:33:13 +02:00
James Almer
b6e92d928f
avformat/av1dec: don't update temporal_unit_size after it's no longer used
...
Signed-off-by: James Almer <jamrial@gmail.com >
2020-08-15 23:31:41 -03:00
James Almer
a72d5290c5
avformat/av1dec: inline obu_read_data() and obu_prefetch() into obu_get_packet()
...
They don't really help making the demuxer more readable.
Reviewed-by: Guangxin Xu <oddstone@gmail.com >
Signed-off-by: James Almer <jamrial@gmail.com >
2020-08-15 13:01:30 -03:00
James Almer
a762fd2c1b
avformat/av1dec: fix return value on some code paths
...
If avio_read() returns a value of bytes read that's lower than the
expected, return an error instead. And when there are zero bytes in
the prefetch buffer, return 0 in order for the frame merge bsf to
drain all potentially buffered packets.
Missed by mistake when amending and committing 9a7bdb6d71
.
Signed-off-by: James Almer <jamrial@gmail.com >
2020-08-14 00:14:37 -03:00
James Almer
3105e97050
avformat/av1dec: add missing preprocessor wrappers to annexb and obu demuxers
...
Ensure the modules are compiled only if enabled.
Signed-off-by: James Almer <jamrial@gmail.com >
2020-08-14 00:02:29 -03:00
Xu Guangxin
9a7bdb6d71
avformat/av1dec: add low-overhead bitstream format
...
It's defined in Section 5.2, used by netflix.
Signed-off-by: James Almer <jamrial@gmail.com >
2020-08-14 00:02:13 -03:00
James Almer
81d54531f7
avformat/av1dec: simplify annexb_probe()
...
Signed-off-by: James Almer <jamrial@gmail.com >
2019-11-16 15:56:36 -03:00
Andreas Rheinhardt
f01f9f1793
avformat/av1dec: Redo flushing of bsf
...
The current approach has two different calls to av_bsf_send_packet():
A normal one, sending a packet; and an extraordinary one just for
flushing. These can be unified into one by making use of the newly
documented fact that av_bsf_send_packet() allows to signal flushing via
empty packets (i.e. packets without data and side-data).
This also fixes CID 1455685 which resulted from the fact that the call
for flushing was not checked given that it couldn't fail.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com >
Signed-off-by: James Almer <jamrial@gmail.com >
2019-11-14 12:02:51 -03:00
James Almer
cc61466058
avformat: add an AV1 Annex B demuxer
...
Signed-off-by: James Almer <jamrial@gmail.com >
2019-11-12 22:21:51 -03:00