[FFmpeg-devel] [PATCH 2/2] avcodec/v4l2_m2m_enc: add a dequeue_timeout parameter

2022-03-23 Thread Ming Qian
For the reason similar to decoder, Set a reasonable timeout instead of -1 to avoid dead waiting in some case. Signed-off-by: Ming Qian --- libavcodec/v4l2_context.c | 4 ++-- libavcodec/v4l2_context.h | 2 +- libavcodec/v4l2_m2m_enc.c | 5 - 3 files changed, 7 insertions(+), 4 deletions(-)

[FFmpeg-devel] [PATCH 1/2] avcodec/v4l2_m2m_dec: add a dequeue_timeout parameter

2022-03-23 Thread Ming Qian
the dequeue of capture queue will be blocked until decoded frame available or an input buffer is ready to be dequeued. but it may cause death waiting in some case. For example, it has enqueued the first input frame, and then blocks at ff_v4l2_context_dequeue_frame. For some reason, the decoder can'

[FFmpeg-devel] [PATCH v2] avcodec/v4l2_m2m_dec: export v4l2 buffer dma-buf

2022-03-23 Thread Ming Qian
if the v4l2 buffer is supported to export dma-buf, then we can report it to AV_PIX_FMT_DRM_PRIME, so the caller can pass it to other hardware device, such as display it directly without copy frame data. Signed-off-by: Ming Qian --- libavcodec/v4l2_buffers.c | 115

[FFmpeg-devel] [PATCH 2/2] avformat/aiffdec: cleanup size handling for extreem cases

2022-03-23 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer --- libavformat/aiffdec.c | 29 - 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c index 5236cc2807..2bdcd1362b 100644 --- a/libavformat/aiffdec.c +++ b/libavformat/aiffdec.

Re: [FFmpeg-devel] [PATCH] avfilter/vf_subtitles: pass storage size to libass

2022-03-23 Thread Oneric
On Tue, Mar 22, 2022 at 13:45:20 -0300, James Almer wrote: > > Will apply it unless someone is against it. Thanks for applying the patch! In case this fix is eligible for backporting: It applies nicely at is to the release/5.0 branch and 5.0 also already requires a new enough libass for ass_set

Re: [FFmpeg-devel] [PATCH 2/8] lavc/avcodec: only allocate the encoding frame for encoders

2022-03-23 Thread James Almer
On 3/23/2022 12:57 PM, Anton Khirnov wrote: And only when needed, i.e. for encoders using the simple API. --- libavcodec/avcodec.c | 4 +--- libavcodec/encode.c | 7 +++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c index db

Re: [FFmpeg-devel] [PATCH 5/8] lavc/encode: add an encoder-specific get_buffer() variant

2022-03-23 Thread James Almer
On 3/23/2022 12:57 PM, Anton Khirnov wrote: Several encoders (roqvideo, svq1, snow, and the mpegvideo family) currently call ff_get_buffer(). However this function is written assuming it is called by a decoder. Though nothing has been obviously broken by this until now, this may change in the

[FFmpeg-devel] [PATCH 8/8] lavc: drop a confusing message about "thread emulation"

2022-03-23 Thread Anton Khirnov
There is no such thing. --- libavcodec/avcodec.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c index 5fd988a41c..dec09476cc 100644 --- a/libavcodec/avcodec.c +++ b/libavcodec/avcodec.c @@ -309,9 +309,6 @@ FF_ENABLE_DEPRECATION_WARNINGS if (r

[FFmpeg-devel] [PATCH 7/8] lavc/pthread_frame: do not copy AVCodecInternal contents

2022-03-23 Thread Anton Khirnov
None of its fields have meaningful values at that point that would need to be copied to frame thread workers. --- libavcodec/pthread_frame.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c index aa971bd74d..4ae1c02f62 1006

[FFmpeg-devel] [PATCH 2/8] lavc/avcodec: only allocate the encoding frame for encoders

2022-03-23 Thread Anton Khirnov
And only when needed, i.e. for encoders using the simple API. --- libavcodec/avcodec.c | 4 +--- libavcodec/encode.c | 7 +++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c index dbaa9f78a2..c7daa385e7 100644 --- a/libavcodec/avcodec

[FFmpeg-devel] [PATCH 6/8] lavc/avcodec: only allocate decoding packets for decoders

2022-03-23 Thread Anton Khirnov
--- libavcodec/avcodec.c | 7 +-- libavcodec/decode.c | 8 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c index c7daa385e7..5fd988a41c 100644 --- a/libavcodec/avcodec.c +++ b/libavcodec/avcodec.c @@ -180,12 +180,7 @@ int att

[FFmpeg-devel] [PATCH 3/8] lavc: move default get_buffer2() to its own file

2022-03-23 Thread Anton Khirnov
It is also used by some encoders, so decode.c is not the right place for it. --- libavcodec/Makefile | 1 + libavcodec/decode.c | 278 --- libavcodec/get_buffer.c | 312 3 files changed, 313 insertions(+), 278 delet

[FFmpeg-devel] [PATCH 4/8] lavc/snow: only allocate mconly_picture for decoding

2022-03-23 Thread Anton Khirnov
It is not used in the encoder. --- libavcodec/snow.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/libavcodec/snow.c b/libavcodec/snow.c index 0a500695ce..1224b95491 100644 --- a/libavcodec/snow.c +++ b/libavcodec/snow.c @@ -513,20 +513,23 @@ int ff_snow_

[FFmpeg-devel] [PATCH 5/8] lavc/encode: add an encoder-specific get_buffer() variant

2022-03-23 Thread Anton Khirnov
Several encoders (roqvideo, svq1, snow, and the mpegvideo family) currently call ff_get_buffer(). However this function is written assuming it is called by a decoder. Though nothing has been obviously broken by this until now, this may change in the future. To avoid potential future issues, introd

[FFmpeg-devel] [PATCH 1/8] lavc/avcodec: simplify codec id/type validity checking

2022-03-23 Thread Anton Khirnov
On entry to avcodec_open2(), the type and id either have to be UNKNOWN/NONE or have to match the codec to be used. --- libavcodec/avcodec.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c index fbe4a5e413..dbaa9f78a2 10

Re: [FFmpeg-devel] [PATCH] ffmpeg: add packet duration to AVPacket logging

2022-03-23 Thread Jan Ekström
On Mon, Mar 14, 2022 at 4:36 PM Paul B Mahol wrote: > > LGTM, could also be refactored/deduplicated. Thanks. Yea, I think I largely agree. Logging function for AVFrames and AVPackets, Additionally debug_ts could use an option to only log the things you are interested in (demux/decode/etc). Appli

Re: [FFmpeg-devel] [PATCH v9 3/5] avcodec/libjxl: add Jpeg XL encoding via libjxl

2022-03-23 Thread Andreas Rheinhardt
Leo Izen: > This commit adds encoding support to libavcodec > for Jpeg XL images via the external library libjxl. > --- > configure | 3 +- > libavcodec/Makefile| 1 + > libavcodec/allcodecs.c | 1 + > libavcodec/libjxlenc.c | 385 + >

Re: [FFmpeg-devel] [PATCH v9 2/5] avcodec/libjxl: add Jpeg XL decoding via libjxl

2022-03-23 Thread Andreas Rheinhardt
Leo Izen: > This commit adds decoding support to libavcodec > for Jpeg XL images via the external library libjxl. > --- > MAINTAINERS | 1 + > configure | 5 + > doc/general_contents.texi | 7 + > libavcodec/Makefile | 1 + > libavcodec/allcodecs.c|

Re: [FFmpeg-devel] [PATCH v9 1/5] avcodec/jpegxl: add Jpeg XL image codec and parser

2022-03-23 Thread Andreas Rheinhardt
Leo Izen: > This commit adds support to libavcodec to read and parse > encoded Jpeg XL images. Jpeg XL is intended to be an > extended-life replacement to legacy mjpeg. > --- > MAINTAINERS| 2 + > libavcodec/Makefile| 1 + > libavcodec/codec_desc.c| 9 + > libavco

Re: [FFmpeg-devel] [PATCH v2] avcodec/libsvtav1: pass color description info

2022-03-23 Thread Jan Ekström
On Wed, Mar 23, 2022 at 2:57 PM James Almer wrote: > > On 3/22/2022 6:54 PM, Jan Ekström wrote: > > From: Christopher Degawa > > > > Signed-off-by: Christopher Degawa > > --- > > libavcodec/libsvtav1.c | 10 ++ > > 1 file changed, 10 insertions(+) > > > > diff --git a/libavcodec/libsv

Re: [FFmpeg-devel] [PATCH] dxva2_hevc: don't use frames as reference if they are not marked as such

2022-03-23 Thread Hendrik Leppkes
On Wed, Mar 23, 2022 at 2:54 PM Steve Lhomme wrote: > > Similar to how a frame is considered for referencing for the RefPicList array. > This will do the same for RefPicSetStCurrBefore, RefPicSetStCurrAfter and > RefPicSetLtCurr. > > Fixes playback of http://www.gbbsoft.pl/!download/!/Film1.mp4 >

[FFmpeg-devel] [PATCH 1/2] avformat/aiffdec: avoid integer overflow in get_meta()

2022-03-23 Thread Michael Niedermayer
Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int' Fixes: 45891/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-6159183893889024 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niede

Re: [FFmpeg-devel] [PATCH] dxva2_hevc: don't use frames as reference if they are not marked as such

2022-03-23 Thread Steve Lhomme
This makes my previous path "avcodec/dxva2: don't call GetDesc on a NULL ID3D11VideoDecoderOutputView" unnecessary. While it avoids a crash in release builds, it should still assert because a bogus reference is used. With this patch no bogus reference is used for that sample file, and playback

[FFmpeg-devel] [PATCH] dxva2_hevc: don't use frames as reference if they are not marked as such

2022-03-23 Thread Steve Lhomme
Similar to how a frame is considered for referencing for the RefPicList array. This will do the same for RefPicSetStCurrBefore, RefPicSetStCurrAfter and RefPicSetLtCurr. Fixes playback of http://www.gbbsoft.pl/!download/!/Film1.mp4 Ref. VLC issue https://code.videolan.org/videolan/vlc/-/issues/267

Re: [FFmpeg-devel] [PATCH 2/2] avformat/aiffdec: check allocated size for overflow

2022-03-23 Thread Michael Niedermayer
On Wed, Mar 23, 2022 at 12:07:25PM +0100, Andreas Rheinhardt wrote: > Michael Niedermayer: > > Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in > > type 'int' > > Fixes: > > 45891/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-6159183893889024 > > > > Found-by: cont

Re: [FFmpeg-devel] [PATCH v7 4/5] avformat/image2: add Jpeg XL as image2 format

2022-03-23 Thread Leo Izen
On 3/23/22 07:38, Anton Khirnov wrote: +    return 0; +    if (avpriv_jpegxl_verify_codestream_header(NULL, p->buf, p->buf_size) == 0) This function is way too complicated for a probe function. Can you think of something simpler? This is necessary to prevent the probetest from returning fal

Re: [FFmpeg-devel] [PATCH v7 1/5] avcodec/jpegxl: add Jpeg XL image codec and parser

2022-03-23 Thread Leo Izen
On 3/23/22 07:36, Anton Khirnov wrote: Quoting Leo Izen (2022-03-19 18:26:41) + +#define jxl_bits(n) jpegxl_get_bits(NULL, jxlr, (n))     IIUC this leads to av_log(NULL). Please no more of these, we are trying to remove them. The prober functions in th

Re: [FFmpeg-devel] [PATCH v2] avcodec/libsvtav1: pass color description info

2022-03-23 Thread James Almer
On 3/22/2022 6:54 PM, Jan Ekström wrote: From: Christopher Degawa Signed-off-by: Christopher Degawa --- libavcodec/libsvtav1.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c index f02e410f69..6cf280377e 100644 --- a/libavcodec

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/av1: only set the private context pix_fmt field if get_pixel_format() succeeds

2022-03-23 Thread Michael Niedermayer
On Tue, Mar 22, 2022 at 04:10:59PM -0300, James Almer wrote: > Otherwise get_pixel_format() will not be called when parsing a subsequent > Sequence > Header in non hwaccel enabled scenarios, allowing frame parsing when it > shouldn't. > > This prevents the scenario seqhdr -> frame_hdr/redundant_

[FFmpeg-devel] [PATCH] avcodec/dxva2: don't call GetDesc on a NULL ID3D11VideoDecoderOutputView

2022-03-23 Thread Steve Lhomme
We should return 0 and assert there's something wrong. This is how it's done with the other DXVA variants. It fixes bad reference usage in http://www.gbbsoft.pl/!download/!/Film1.mp4 It's using a frame that doesn't have any data[] fields set (yet?). Signed-off-by: Steve Lhomme --- libavcodec/dx

Re: [FFmpeg-devel] [PATCH] avcodec/bsf: Add FFBitStreamFilter, hide internals of BSFs

2022-03-23 Thread Andreas Rheinhardt
Andreas Rheinhardt: > This patch is analogous to 20f972701806be20a77f808db332d9489343bb78: > It hides the internal part of AVBitStreamFilter by adding a new > internal structure FFBitStreamFilter (declared in bsf_internal.h) > that has an AVBitStreamFilter as its first member; the internal > part o

Re: [FFmpeg-devel] [PATCH 1/6] avcodec/internal, avfilter/qp_table: Remove unused FF_QSCALE_TYPEs

2022-03-23 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/internal.h | 2 -- > libavfilter/qp_table.h | 4 > 2 files changed, 6 deletions(-) > > diff --git a/libavcodec/internal.h b/libavcodec/internal.h > index badca4c9dd..f9809926b8 100644 > --- a/libavcodec/internal.h >

Re: [FFmpeg-devel] [PATCH v7 4/5] avformat/image2: add Jpeg XL as image2 format

2022-03-23 Thread Anton Khirnov
Quoting Leo Izen (2022-03-19 18:26:44) > This commit adds support to libavformat for muxing > and demuxing Jpeg XL images as image2 streams. > --- > libavformat/allformats.c | 1 + > libavformat/img2.c | 1 + > libavformat/img2dec.c| 21 + > libavformat/img2enc.c

Re: [FFmpeg-devel] [PATCH v7 1/5] avcodec/jpegxl: add Jpeg XL image codec and parser

2022-03-23 Thread Anton Khirnov
Quoting Leo Izen (2022-03-19 18:26:41) > + > +#define jxl_bits(n) jpegxl_get_bits(NULL, jxlr, (n)) IIUC this leads to av_log(NULL). Please no more of these, we are trying to remove them. -- Anton Khirnov ___ f

Re: [FFmpeg-devel] [PATCH v9 1/1] avformat: Add IPFS protocol support.

2022-03-23 Thread Mark Gaiser
On Fri, Mar 18, 2022 at 3:59 PM Mark Gaiser wrote: > On Fri, Mar 18, 2022 at 3:50 PM Mark Gaiser wrote: > >> This patch adds support for: >> - ffplay ipfs:// >> - ffplay ipns:// >> >> IPFS data can be played from so called "ipfs gateways". >> A gateway is essentially a webserver that gives acces

[FFmpeg-devel] [PATCH] avformat/mov: Initialize padding of buffer

2022-03-23 Thread Andreas Rheinhardt
Fixes ticket #9695. Signed-off-by: Andreas Rheinhardt --- No value read from the padding is actually used at all; Valgrind is smart enough to detect this and not warn about this. MemorySanitizer is unfortunately not. Do we treat such issues as real or just close them as false positives? libavfo

Re: [FFmpeg-devel] [PATCH 2/2] avformat/aiffdec: check allocated size for overflow

2022-03-23 Thread Andreas Rheinhardt
Michael Niedermayer: > Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type > 'int' > Fixes: > 45891/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-6159183893889024 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/

[FFmpeg-devel] [PATCH v9 5/5] fate/jpegxl: add Jpeg XL demux and parse FATE test

2022-03-23 Thread Leo Izen
Add a fate test for the Jpeg XL parser in libavcodec and its image2 wrapper inside libavformat. --- tests/fate/image.mak| 10 ++ tests/ref/fate/jxl-parse-codestream | 6 ++ tests/ref/fate/jxl-parse-container | 6 ++ 3 files changed, 22 insertions(+) create mode

[FFmpeg-devel] [PATCH v9 4/5] avformat/image2: add Jpeg XL as image2 format

2022-03-23 Thread Leo Izen
This commit adds support to libavformat for muxing and demuxing Jpeg XL images as image2 streams. --- libavformat/allformats.c | 1 + libavformat/img2.c | 1 + libavformat/img2dec.c| 21 + libavformat/img2enc.c| 6 +++--- libavformat/mov.c| 1 + libavf

[FFmpeg-devel] [PATCH v9 3/5] avcodec/libjxl: add Jpeg XL encoding via libjxl

2022-03-23 Thread Leo Izen
This commit adds encoding support to libavcodec for Jpeg XL images via the external library libjxl. --- configure | 3 +- libavcodec/Makefile| 1 + libavcodec/allcodecs.c | 1 + libavcodec/libjxlenc.c | 385 + 4 files changed, 389 inse

[FFmpeg-devel] [PATCH v9 2/5] avcodec/libjxl: add Jpeg XL decoding via libjxl

2022-03-23 Thread Leo Izen
This commit adds decoding support to libavcodec for Jpeg XL images via the external library libjxl. --- MAINTAINERS | 1 + configure | 5 + doc/general_contents.texi | 7 + libavcodec/Makefile | 1 + libavcodec/allcodecs.c| 1 + libavcodec/libjxl.c

[FFmpeg-devel] [PATCH v9 1/5] avcodec/jpegxl: add Jpeg XL image codec and parser

2022-03-23 Thread Leo Izen
This commit adds support to libavcodec to read and parse encoded Jpeg XL images. Jpeg XL is intended to be an extended-life replacement to legacy mjpeg. --- MAINTAINERS| 2 + libavcodec/Makefile| 1 + libavcodec/codec_desc.c| 9 + libavcodec/codec_id.h | 1

Re: [FFmpeg-devel] [PATCH] avformat/codec2: remove surplus include 'memory.h' statement

2022-03-23 Thread Andreas Rheinhardt
Peter Ross: > on glibc memory.h drags in string.h, but codec2 does not use any > str* or mem* functions. additionally, memory.h is not part of the > C99 or POSIX standards. > --- > libavformat/codec2.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/libavformat/codec2.c b/libavformat/code

[FFmpeg-devel] [PATCH 2/2] avformat/aiffdec: check allocated size for overflow

2022-03-23 Thread Michael Niedermayer
Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int' Fixes: 45891/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-6159183893889024 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niede

[FFmpeg-devel] [PATCH v8 5/5] fate/jpegxl: add Jpeg XL demux and parse FATE test

2022-03-23 Thread Leo Izen
Add a fate test for the Jpeg XL parser in libavcodec and its image2 wrapper inside libavformat. --- tests/fate/image.mak| 10 ++ tests/ref/fate/jxl-parse-codestream | 6 ++ tests/ref/fate/jxl-parse-container | 6 ++ 3 files changed, 22 insertions(+) create mode

[FFmpeg-devel] [PATCH v8 4/5] avformat/image2: add Jpeg XL as image2 format

2022-03-23 Thread Leo Izen
This commit adds support to libavformat for muxing and demuxing Jpeg XL images as image2 streams. --- libavformat/allformats.c | 1 + libavformat/img2.c | 1 + libavformat/img2dec.c| 21 + libavformat/img2enc.c| 6 +++--- libavformat/mov.c| 1 + libavf

[FFmpeg-devel] [PATCH v8 3/5] avcodec/libjxl: add Jpeg XL encoding via libjxl

2022-03-23 Thread Leo Izen
This commit adds encoding support to libavcodec for Jpeg XL images via the external library libjxl. --- configure | 3 +- libavcodec/Makefile| 1 + libavcodec/allcodecs.c | 1 + libavcodec/libjxlenc.c | 385 + 4 files changed, 389 inse

[FFmpeg-devel] [PATCH v8 2/5] avcodec/libjxl: add Jpeg XL decoding via libjxl

2022-03-23 Thread Leo Izen
This commit adds decoding support to libavcodec for Jpeg XL images via the external library libjxl. --- MAINTAINERS | 1 + configure | 5 + doc/general_contents.texi | 7 + libavcodec/Makefile | 1 + libavcodec/allcodecs.c| 1 + libavcodec/libjxl.c

[FFmpeg-devel] [PATCH v8 1/5] avcodec/jpegxl: add Jpeg XL image codec and parser

2022-03-23 Thread Leo Izen
This commit adds support to libavcodec to read and parse encoded Jpeg XL images. Jpeg XL is intended to be an extended-life replacement to legacy mjpeg. --- MAINTAINERS| 2 + libavcodec/Makefile| 1 + libavcodec/codec_desc.c| 9 + libavcodec/codec_id.h | 1

[FFmpeg-devel] [PATCH 1/2] avformat/aaxdec: Check for overlaping segments

2022-03-23 Thread Michael Niedermayer
Fixes: Timeout Fixes: 45875/clusterfuzz-testcase-minimized-ffmpeg_dem_AAX_fuzzer-6121689903136768 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/aaxdec.c | 4 1 file changed, 4 insertio

Re: [FFmpeg-devel] [PATCH v4 1/2] lavc/vaapi_encode: add support for maxframesize

2022-03-23 Thread Wang, Fei W
> -Original Message- > From: Wang, Fei W > Sent: Tuesday, March 22, 2022 10:11 PM > To: ffmpeg-devel@ffmpeg.org > Cc: Linjie Fu ; Wang, Fei W > Subject: [PATCH v4 1/2] lavc/vaapi_encode: add support for maxframesize > > From: Linjie Fu > > Add support for max frame size: > - max_fr

Re: [FFmpeg-devel] [PATCH] libavcodec/hevc_mp4toannexb_bsf: insert extradata before non-AUD unit

2022-03-23 Thread Xiang, Haihao
On Tue, 2022-03-22 at 10:29 +0100, Andreas Rheinhardt wrote: > Xiang, Haihao: > > From: Haihao Xiang > > > > It is possible that an IRAP frame in input AVPacket contains VPS, SPS > > and PPS, and these headers should take effect. However the prepended > > extradata might override these headers. T

[FFmpeg-devel] [PATCH] libavcodec/cbs_av1: Add size check before parse obu

2022-03-23 Thread Wenbin Chen
cbs_av1_write_unit() check pbc size after parsing obu frame, and return AVERROR(ENOSPC) if pbc is small. pbc will be reallocated and this obu frame will be parsed again, but this may cause error because CodedBitstreamAV1Context has already been updated, for example ref_order_hint is updated and wil