Re: [FFmpeg-devel] [PATCH] avfilter/geq: unbreak alpha processing

2022-05-07 Thread Gyan Doshi
On 2022-05-08 12:40 am, Michael Niedermayer wrote: On Sat, May 07, 2022 at 05:34:39PM +0530, Gyan Doshi wrote: d607af50fd broke alpha processing by always overwriting any supplied alpha expression. --- libavfilter/vf_geq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) LGTM Pushe

Re: [FFmpeg-devel] [PATCH] libavcodec/mpeg12dec: extract embedded CC of particular type only

2022-05-07 Thread lance . lmwang
On Wed, Apr 27, 2022 at 03:49:49PM +0700, Ivan Baykalov wrote: > Some streams contain closed caption data embedded using several wrapping > types. For example stream can contain CC wrapped as ATSC A53 packets + > the same data wrapped as SCTE-20 packets. Prior to the patch CC data was > extracted f

[FFmpeg-devel] [PATCH v3 09/11] libavformat/asfdec: ensure variables are initialized

2022-05-07 Thread softworkz
From: softworkz Signed-off-by: softworkz --- libavformat/asfdec_f.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c index 928e5717fc..4af8200f89 100644 --- a/libavformat/asfdec_f.c +++ b/libavformat/asfdec_f.c @@ -977,6 +977,7 @@ static int as

[FFmpeg-devel] [PATCH v3 08/11] libavformat/asfdec: remove variable redefinition in inner scope

2022-05-07 Thread softworkz
From: softworkz Signed-off-by: softworkz --- libavformat/asfdec_f.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c index 9a6f45d9a5..928e5717fc 100644 --- a/libavformat/asfdec_f.c +++ b/libavformat/asfdec_f.c @@ -1190,7 +119

[FFmpeg-devel] [PATCH v3 07/11] libavformat/asfdec: fix macro definition and use

2022-05-07 Thread softworkz
From: softworkz Signed-off-by: softworkz --- libavformat/asfdec_f.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c index 19b4a5fad1..9a6f45d9a5 100644 --- a/libavformat/asfdec_f.c +++ b/libavformat/a

[FFmpeg-devel] [PATCH v3 11/11] libavformat/asfdec: fix variable types and add checks for unsupported values

2022-05-07 Thread softworkz
From: softworkz Signed-off-by: softworkz --- libavformat/asfdec_f.c | 168 ++--- 1 file changed, 108 insertions(+), 60 deletions(-) diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c index 3663f31330..da43c2bc11 100644 --- a/libavformat/asfdec_f.c

[FFmpeg-devel] [PATCH v3 06/11] libavformat/asfdec: remove unused parameters

2022-05-07 Thread softworkz
From: softworkz Signed-off-by: softworkz --- libavformat/asfdec_f.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c index 9ad2ca946b..19b4a5fad1 100644 --- a/libavformat/asfdec_f.c +++ b/libavfo

[FFmpeg-devel] [PATCH v3 05/11] libavformat/asfdec: implement parsing of GUID values

2022-05-07 Thread softworkz
From: softworkz Signed-off-by: softworkz --- libavformat/asfdec_f.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c index 8071325a2f..9ad2ca946b 100644 --- a/libavformat/asfdec_f.c +++ b/libavformat/asfdec_f.c @@ -280,

[FFmpeg-devel] [PATCH v3 10/11] libavformat/asfdec: fix parameter type in asf_read_stream_propertie()

2022-05-07 Thread softworkz
From: softworkz Signed-off-by: softworkz --- libavformat/asfdec_f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c index 4af8200f89..3663f31330 100644 --- a/libavformat/asfdec_f.c +++ b/libavformat/asfdec_f.c @@ -323,7 +323,7

[FFmpeg-devel] [PATCH v3 04/11] libavformat/asfdec: fixing get_tag

2022-05-07 Thread softworkz
From: softworkz These three are closely related and can't be separated easily: In get_tag, the code was adding 22 bytes (in order to allow it to hold 64bit numbers as string) to the value len for creating creating a buffer. This was unnecessarily imposing a size-constraint on the value_len param

[FFmpeg-devel] [PATCH v3 03/11] libavformat/asfdec: fix type of value_len

2022-05-07 Thread softworkz
From: softworkz The value_len is an uint32 not an int32 per spec. That value must not be truncated, neither by casting to int, nor by any conditional checks, because at the end of get_tag, this value is needed to move forward in parsing. When the len value gets modified, the parsing may break. S

[FFmpeg-devel] [PATCH v3 02/11] libavformat/asfdec: fix get_value return type and add checks for

2022-05-07 Thread softworkz
From: softworkz unsupported values get_value had a return type of int, which means that reading QWORDS (case 4) was broken due to truncation of the result from avio_rl64(). Signed-off-by: softworkz --- libavformat/asfdec_f.c | 57 +++--- 1 file changed, 43

[FFmpeg-devel] [PATCH v3 01/11] libavformat/asf: fix handling of byte array length values

2022-05-07 Thread softworkz
From: softworkz The spec allows attachment sizes of up to UINT32_MAX while we can handle only sizes up to INT32_MAX (in downstream code) The debug.assert in get_tag didn't really address this, and truncating the value_len in calling methods cannot be used because the length value is required in

[FFmpeg-devel] [PATCH v3 00/11] libavformat/asf: fix handling of byte array length values

2022-05-07 Thread ffmpegagent
The spec allows attachment sizes of up to UINT32_MAX while we can handle only sizes up to INT32_MAX (in downstream code) The debug.assert in get_tag didn't really address this, and truncating the value_len in calling methods cannot be used because the length value is required in order to continue

Re: [FFmpeg-devel] [PATCH 3/3] lavf/cavsvideodec: Add GuangDian profile support

2022-05-07 Thread myp...@gmail.com
On Mon, May 2, 2022 at 1:15 PM "zhilizhao(赵志立)" wrote: > > > > > On May 2, 2022, at 11:36 AM, Jun Zhao wrote: > > > > From: Jun Zhao > > > > Enable the Guangdian profile support > > > > Signed-off-by: Jun Zhao > > --- > > libavformat/cavsvideodec.c | 5 +++-- > > 1 file changed, 3 insertions(+),

Re: [FFmpeg-devel] [PATCH v2 01/11] libavformat/asf: fix handling of byte array length values

2022-05-07 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Michael Niedermayer > Sent: Saturday, May 7, 2022 8:49 PM > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH v2 01/11] libavformat/asf: fix > handling of byte array length valu

[FFmpeg-devel] [PATCH v2 2/2] avformat/hlsenc: expand the scope of flags from int32_t to int64_t

2022-05-07 Thread Steven Liu
because the flags in AVOption support i64. Signed-off-by: Steven Liu --- libavformat/hlsenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index b9f79e30d8..00645ae74e 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c

[FFmpeg-devel] [PATCH v2 1/2] avformat/hlsenc: check discont_program_date_time before use it in parse_playlist

2022-05-07 Thread Steven Liu
In parse_playlist, the discont_program_date_time should be used after EXT-X-PROGRAM-DATE-TIME tag parsed. Signed-off-by: Steven Liu --- libavformat/hlsenc.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index d2b8215dff..b9f

[FFmpeg-devel] [PATCH 2/2] avformat/hlsenc: expand the scope of flags from int32_t to int64_t

2022-05-07 Thread Steven Liu
because the flags in AVOption support i64. Signed-off-by: Steven Liu --- libavformat/hlsenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index d91c7ebcb7..8e91c7a980 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c

[FFmpeg-devel] [PATCH 1/2] avformat/hlsenc: check option before set discont_program_date_time

2022-05-07 Thread Steven Liu
fix ticket: 9238 There should check option flags with HLS_PROGRAM_DATE_TIME before set discont_program_date_time. Signed-off-by: Steven Liu --- libavformat/hlsenc.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index d2b8215

[FFmpeg-devel] [PATCH] avformat/http: remove unused function ff_http_get_shutdown_status

2022-05-07 Thread Steven Liu
From: Steven Liu ff_http_get_shutdown_status is unused after ticket 9010 fixed. Signed-off-by: Steven Liu --- libavformat/http.c | 15 --- libavformat/http.h | 9 - 2 files changed, 24 deletions(-) diff --git a/libavformat/http.c b/libavformat/http.c index c4eeb58cd0..c8f

Re: [FFmpeg-devel] [PATCH] avfilter/geq: unbreak alpha processing

2022-05-07 Thread Michael Niedermayer
On Sat, May 07, 2022 at 05:34:39PM +0530, Gyan Doshi wrote: > d607af50fd broke alpha processing by always overwriting any supplied > alpha expression. > --- > libavfilter/vf_geq.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) LGTM thx [...] -- Michael GnuPG fingerprint: 9FF2128B1

Re: [FFmpeg-devel] [PATCH v2 02/11] libavformat/asfdec: fix get_value return type and add checks for

2022-05-07 Thread Michael Niedermayer
On Sat, May 07, 2022 at 09:36:35AM +, softworkz wrote: > From: softworkz > > unsupported values > > get_value had a return type of int, which means that reading > QWORDS (case 4) was broken due to truncation of the result from > avio_rl64(). > > Signed-off-by: softworkz > --- > libavforma

Re: [FFmpeg-devel] [PATCH v2 01/11] libavformat/asf: fix handling of byte array length values

2022-05-07 Thread Michael Niedermayer
On Sat, May 07, 2022 at 09:36:34AM +, softworkz wrote: > From: softworkz > > The spec allows attachment sizes of up to UINT32_MAX while > we can handle only sizes up to INT32_MAX (in downstream > code) > > The debug.assert in get_tag didn't really address this, > and truncating the value_len

Re: [FFmpeg-devel] [PATCH v11 2/6] libavformat/avisynth.c: Remove MAX_PATH limit

2022-05-07 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of Nil > Admirari > Sent: Saturday, April 23, 2022 10:56 PM > To: ffmpeg-devel@ffmpeg.org > Subject: [FFmpeg-devel] [PATCH v11 2/6] libavformat/avisynth.c: Remove > MAX_PATH limit > > --- > libavformat/avisynth.c | 12 +++- >

Re: [FFmpeg-devel] [PATCH v11 1/6] libavutil/wchar_filename.h: Add whcartoutf8, wchartoansi and utf8toansi

2022-05-07 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of nil- > admir...@mailo.com > Sent: Saturday, May 7, 2022 7:33 PM > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH v11 1/6] > libavutil/wchar_filename.h: Add whcartoutf8, wchartoansi and > utf8toansi > > You have co

Re: [FFmpeg-devel] [PATCH v11 1/6] libavutil/wchar_filename.h: Add whcartoutf8, wchartoansi and utf8toansi

2022-05-07 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of Nil > Admirari > Sent: Saturday, April 23, 2022 10:56 PM > To: ffmpeg-devel@ffmpeg.org > Subject: [FFmpeg-devel] [PATCH v11 1/6] libavutil/wchar_filename.h: > Add whcartoutf8, wchartoansi and utf8toansi > > These functions are goin

[FFmpeg-devel] [PATCH 2/2] avfilter: use av_fopen_utf8() instead of plain fopen()

2022-05-07 Thread softworkz
From: softworkz Signed-off-by: softworkz --- libavfilter/af_firequalizer.c | 2 +- libavfilter/vf_deshake.c | 2 +- libavfilter/vf_signature.c| 4 ++-- libavfilter/vf_ssim.c | 2 +- libavfilter/vf_vmafmotion.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --g

[FFmpeg-devel] [PATCH 1/2] fftools: use av_fopen_utf8() instead of plain fopen()

2022-05-07 Thread softworkz
From: softworkz Signed-off-by: softworkz --- fftools/cmdutils.c | 6 +++--- fftools/ffmpeg.c | 4 ++-- fftools/opt_common.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 5d7cdc3e10..ca3a4c267a 100644 --- a/fftools/cmdu

[FFmpeg-devel] [PATCH 0/2] use av_fopen_utf8() instead of plain fopen()

2022-05-07 Thread ffmpegagent
Unify file access operations by replacing usages of direct calls to posix fopen() softworkz (2): fftools: use av_fopen_utf8() instead of plain fopen() avfilter: use av_fopen_utf8() instead of plain fopen() fftools/cmdutils.c| 6 +++--- fftools/ffmpeg.c | 4 ++-- ffto

Re: [FFmpeg-devel] [PATCH v11 1/6] libavutil/wchar_filename.h: Add whcartoutf8, wchartoansi and utf8toansi

2022-05-07 Thread nil-admirari
You have completely ignored my question, haven't you? Here it is again: >> Is there a Path struct, analogous to LLVM class, that all of FFmpeg is using? >> Or FFmpeg isn't using any special structs and paths are indistinguishable >> from ordinary strings? > Read again. As each lib gets its own co

Re: [FFmpeg-devel] [PATCH v2 37/44] avformat/asf: Move ASF GUIDs to a new file

2022-05-07 Thread Soft Works
> -Original Message- > From: Andreas Rheinhardt > Sent: Saturday, May 7, 2022 2:28 PM > To: Soft Works ; FFmpeg development discussions > and patches > Subject: Re: [FFmpeg-devel] [PATCH v2 37/44] avformat/asf: Move ASF > GUIDs to a new file > > Soft Works: > > > > > >> -Original

Re: [FFmpeg-devel] [PATCH v2 37/44] avformat/asf: Move ASF GUIDs to a new file

2022-05-07 Thread Andreas Rheinhardt
Soft Works: > > >> -Original Message- >> From: ffmpeg-devel On Behalf Of >> Andreas Rheinhardt >> Sent: Saturday, May 7, 2022 1:59 PM >> To: ffmpeg-devel@ffmpeg.org >> Cc: Andreas Rheinhardt >> Subject: [FFmpeg-devel] [PATCH v2 37/44] avformat/asf: Move ASF GUIDs >> to a new file >> >>

Re: [FFmpeg-devel] [PATCH v2 37/44] avformat/asf: Move ASF GUIDs to a new file

2022-05-07 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Andreas Rheinhardt > Sent: Saturday, May 7, 2022 1:59 PM > To: ffmpeg-devel@ffmpeg.org > Cc: Andreas Rheinhardt > Subject: [FFmpeg-devel] [PATCH v2 37/44] avformat/asf: Move ASF GUIDs > to a new file > > They are also needed by

[FFmpeg-devel] [PATCH] avfilter/geq: unbreak alpha processing

2022-05-07 Thread Gyan Doshi
d607af50fd broke alpha processing by always overwriting any supplied alpha expression. --- libavfilter/vf_geq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_geq.c b/libavfilter/vf_geq.c index fd9e0fd80b..2b53980278 100644 --- a/libavfilter/vf_geq.c +++ b/libav

[FFmpeg-devel] [PATCH v2 37/44] avformat/asf: Move ASF GUIDs to a new file

2022-05-07 Thread Andreas Rheinhardt
They are also needed by the MMSH and MMST protocols and therefore the file they are in is pulled in when these protocols are enabled and used. By moving them to a separate file, linking statically to libavformat while only using AVIO no longer pulls in all the muxers/demuxers (and also no longer an

Re: [FFmpeg-devel] PATCH - libmad MP3 decoding support

2022-05-07 Thread David Fletcher
On Fri May 6 21:29:51 EEST 2022 Lynne dev at lynne.ee wrote: > I disagree with this patch. The native decoder should be fixed instead, > or if it's not able to be fixed, users should use specialized libraries. > We're not adding a yet another decoding library to fix an issue on > very old ARM chip

[FFmpeg-devel] [PATCH 44/44] avformat/utils: Move ff_format_io_close.* to options.c, avformat.c

2022-05-07 Thread Andreas Rheinhardt
These are not pure avio-functions, but auxiliary AVFormatContext functions. Signed-off-by: Andreas Rheinhardt --- libavformat/avformat.c | 14 ++ libavformat/options.c | 5 + libavformat/utils.c| 18 -- 3 files changed, 19 insertions(+), 18 deletions(-) dif

[FFmpeg-devel] [PATCH 43/44] avformat/utils: Move ff_stream_side_data_copy to avformat.c

2022-05-07 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/avformat.c | 30 ++ libavformat/utils.c| 30 -- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/libavformat/avformat.c b/libavformat/avformat.c index 2a919ad89f..3eae41d1

[FFmpeg-devel] [PATCH 42/44] avformat/utils: Move avpriv_set_pts_info() to avformat.c

2022-05-07 Thread Andreas Rheinhardt
It is an essential auxiliary function for both demuxing and muxing. Signed-off-by: Andreas Rheinhardt --- libavformat/avformat.c | 26 ++ libavformat/utils.c| 26 -- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/libavformat/a

[FFmpeg-devel] [PATCH 41/44] avformat/utils: Move ff_copy_whiteblacklists to avformat.c

2022-05-07 Thread Andreas Rheinhardt
This is an auxiliary function for AVFormatContexts. Signed-off-by: Andreas Rheinhardt --- libavformat/avformat.c | 20 libavformat/utils.c| 21 - 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/libavformat/avformat.c b/libavformat/avf

[FFmpeg-devel] [PATCH 40/44] avformat/utils: Move ff_format_set_url to avformat.c

2022-05-07 Thread Andreas Rheinhardt
An auxiliary function for AVFormatContexts (mainly muxers, but potentially (e.g. rtsp) also demuxers). Signed-off-by: Andreas Rheinhardt --- libavformat/avformat.c | 7 +++ libavformat/utils.c| 7 --- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libavformat/avformat

[FFmpeg-devel] [PATCH 39/44] avformat/utils: Move ff_is_intra_only to avformat.c

2022-05-07 Thread Andreas Rheinhardt
It is an auxiliary function only used by the generic muxing and demuxing code. Signed-off-by: Andreas Rheinhardt --- libavformat/avformat.c | 12 libavformat/utils.c| 13 - 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/libavformat/avformat.c b/liba

[FFmpeg-devel] [PATCH 38/44] avformat/utils: Move ff_find_stream_index to demux_utils.c

2022-05-07 Thread Andreas Rheinhardt
It is only used by demuxers (and it is generally demuxers who have to translate format-specific IDs to stream indices). Signed-off-by: Andreas Rheinhardt --- libavformat/demux.h | 6 ++ libavformat/demux_utils.c | 8 libavformat/gxf.c | 1 + libavformat/internal.h|

[FFmpeg-devel] [PATCH 37/44] avformat/asf: Move ASF GUIDs to a new file

2022-05-07 Thread Andreas Rheinhardt
They are also needed by the MMSH and MMST protocols and therefore the file they are in is pulled in when these protocols are enabled and used. By moving them to a separate file, linking statically to libavformat while only using AVIO no longer pulls in all the muxers/demuxers (and also no longer an

[FFmpeg-devel] [PATCH 36/44] avformat/utils: Move av_find_best_stream to avformat.c

2022-05-07 Thread Andreas Rheinhardt
It is not forbidden to call this with a muxer, so it is moved to avformat.c and not demux_utils.c. ff_find_decoder(), which is used by av_find_best_stream() is also moved as well, despite being even more geared towards demuxers. Signed-off-by: Andreas Rheinhardt --- libavformat/avformat.c | 84 +

[FFmpeg-devel] [PATCH 35/44] avformat/utils: Move av_find_default_stream_index to avformat.c

2022-05-07 Thread Andreas Rheinhardt
While it is clearly written with demuxers in mind, it is not forbidden to call it with muxers, hence avformat.c and not demux_utils.c. Signed-off-by: Andreas Rheinhardt --- libavformat/avformat.c | 36 libavformat/utils.c| 36 -

[FFmpeg-devel] [PATCH 34/44] avformat/utils: Move av_find_program_from_stream to avformat.c

2022-05-07 Thread Andreas Rheinhardt
It is potentially used with both demuxers and muxers. Signed-off-by: Andreas Rheinhardt --- libavformat/avformat.c | 15 +++ libavformat/utils.c| 15 --- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/libavformat/avformat.c b/libavformat/avformat.c i

[FFmpeg-devel] [PATCH 33/44] avformat/utils: Move guessing frame rate/SAR to avformat.c

2022-05-07 Thread Andreas Rheinhardt
It is not explicitly forbidden to call these functions with muxers (although it is probably intended to be only called by demuxers; av_guess_sample_aspect_ratio even says that "the stream aspect ratio is set by the demuxer"). Signed-off-by: Andreas Rheinhardt --- libavformat/avformat.c | 45

[FFmpeg-devel] [PATCH 32/44] avformat/utils: Move matching stream specificiers to avformat.c

2022-05-07 Thread Andreas Rheinhardt
It is not to call this with a muxer, so move it to avformat.c and not demux_utils.c. Signed-off-by: Andreas Rheinhardt --- libavformat/avformat.c | 179 + libavformat/utils.c| 179 - 2 files changed, 179 insertio

[FFmpeg-devel] [PATCH 31/44] avformat/utils: Move internal stream timebase stuff to avformat.c

2022-05-07 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/avformat.c | 66 ++ libavformat/utils.c| 65 - 2 files changed, 66 insertions(+), 65 deletions(-) diff --git a/libavformat/avformat.c b/libavformat/avformat.c ind

[FFmpeg-devel] [PATCH 30/44] avformat/utils: Move adding AVProgram to avformat.c

2022-05-07 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/avformat.c | 58 ++ libavformat/utils.c| 58 -- 2 files changed, 58 insertions(+), 58 deletions(-) diff --git a/libavformat/avformat.c b/libavformat/avformat.c in

[FFmpeg-devel] [PATCH 29/44] avformat/utils: Move av_stream_*_side_data API to avformat.c

2022-05-07 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/avformat.c | 68 ++ libavformat/utils.c| 68 -- 2 files changed, 68 insertions(+), 68 deletions(-) diff --git a/libavformat/avformat.c b/libavformat/avformat.c in

[FFmpeg-devel] [PATCH 28/44] avformat/utils: Move freeing AVFormatContext to a new file avformat.c

2022-05-07 Thread Andreas Rheinhardt
This file will contain the AVFormatContext-specific parts that are used by both demuxers and muxers. Signed-off-by: Andreas Rheinhardt --- libavformat/Makefile | 1 + libavformat/avformat.c | 130 + libavformat/utils.c| 104

[FFmpeg-devel] [PATCH 27/44] avformat/utils: Move ff_get_extradata to demux_utils.c

2022-05-07 Thread Andreas Rheinhardt
It is only used by demuxers (although it is hypothetically possible that some day e.g. a protocol might need it, but that is unlikely given that they don't deal with AVCodecParameters). Signed-off-by: Andreas Rheinhardt --- libavformat/aaxdec.c | 1 + libavformat/acm.c | 1 + li

[FFmpeg-devel] [PATCH 26/44] avformat/internal: Make AVFormatContext* a logctx in ff_get_extradata

2022-05-07 Thread Andreas Rheinhardt
I.e. use void* instead of AVFormatContext*, because it is only used for logging. Signed-off-by: Andreas Rheinhardt --- libavformat/internal.h | 2 +- libavformat/utils.c| 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavformat/internal.h b/libavformat/internal.h in

[FFmpeg-devel] [PATCH 25/44] avformat/utils: Move ff_generate_avci_extradata to demux_utils.c

2022-05-07 Thread Andreas Rheinhardt
Only used by demuxers. Signed-off-by: Andreas Rheinhardt --- libavformat/demux.h | 6 ++ libavformat/demux_utils.c | 135 ++ libavformat/internal.h| 6 -- libavformat/utils.c | 135 -- 4 files changed, 14

[FFmpeg-devel] [PATCH 24/44] avformat/utils: Move av_read_(play|pause) to demux_utils.c

2022-05-07 Thread Andreas Rheinhardt
These functions are for demuxers only. Signed-off-by: Andreas Rheinhardt --- libavformat/demux_utils.c | 18 ++ libavformat/utils.c | 18 -- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/libavformat/demux_utils.c b/libavformat/demux_utils.

[FFmpeg-devel] [PATCH 23/44] avformat/utils: Move ff_add_param_change to demux_utils.c

2022-05-07 Thread Andreas Rheinhardt
Only demuxers have a need to add side-data to a packet. Signed-off-by: Andreas Rheinhardt --- libavformat/demux.h | 8 ++ libavformat/demux_utils.c | 54 +++ libavformat/flvdec.c | 1 + libavformat/internal.h| 8 -- libavformat/ipmovi

[FFmpeg-devel] [PATCH 22/44] avformat/utils: Move ff_add_attached_pic to demux_utils.c

2022-05-07 Thread Andreas Rheinhardt
It is demuxer-only: It potentially adds an AVStream and it sets AVStream.attached_pic. Signed-off-by: Andreas Rheinhardt --- libavformat/apetag.c | 1 + libavformat/asf.c | 1 + libavformat/demux.h| 16 libavformat/demux_utils.c | 36 +++

[FFmpeg-devel] [PATCH 21/44] avformat/utils: Move avformat_queue_attached_pictures to demux_utils.c

2022-05-07 Thread Andreas Rheinhardt
AVStream.attached_pic is only used for demuxers. Signed-off-by: Andreas Rheinhardt --- libavformat/demux_utils.c | 24 libavformat/utils.c | 23 --- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/libavformat/demux_utils.c b/lib

[FFmpeg-devel] [PATCH 20/44] avformat/utils: Move av_format_inject_global_side_data to demux_utils.c

2022-05-07 Thread Andreas Rheinhardt
This function is only intended for demuxers (as calling it doesn't have any observable effect for a muxer). Signed-off-by: Andreas Rheinhardt --- libavformat/demux_utils.c | 10 ++ libavformat/utils.c | 10 -- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a

[FFmpeg-devel] [PATCH 19/44] avformat/utils: Move avpriv_new_chapter to demux_utils.c

2022-05-07 Thread Andreas Rheinhardt
It is demuxer-only: Muxers deal only with chapters given to them; they don't create any of their own. Signed-off-by: Andreas Rheinhardt --- libavformat/demux.h | 14 libavformat/demux_utils.c| 41 libavformat/ffmetadec.c | 2 +-

[FFmpeg-devel] [PATCH 18/44] avdevice/v4l2*: Improve included headers

2022-05-07 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavdevice/v4l2-common.h | 13 +++-- libavdevice/v4l2.c| 8 libavdevice/v4l2enc.c | 4 +++- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/libavdevice/v4l2-common.h b/libavdevice/v4l2-common.h index c7bed3e3b4

[FFmpeg-devel] [PATCH 17/44] avformat/utils: Move parser functions to a new file, demux_utils.c

2022-05-07 Thread Andreas Rheinhardt
This file is both for the various public APIs that are demuxer-only as well as for the demuxer-only internal functions. Signed-off-by: Andreas Rheinhardt --- libavdevice/v4l2.c| 1 + libavformat/Makefile | 1 + libavformat/demux.h | 2 ++ libavformat/demux_utils.c | 34

[FFmpeg-devel] [PATCH 16/44] avformat/internal: Move definition of FFStream->info to demux.h

2022-05-07 Thread Andreas Rheinhardt
It is only used by avformat_find_stream_info(). Signed-off-by: Andreas Rheinhardt --- libavformat/demux.c| 45 +- libavformat/demux.h| 29 +++ libavformat/internal.h | 30 +--- libavformat/utils.c

[FFmpeg-devel] [PATCH 15/44] avformat/demux: Add new demux.h header

2022-05-07 Thread Andreas Rheinhardt
And move those stuff already in demuxer-only files to it. Signed-off-by: Andreas Rheinhardt --- libavdevice/libcdio.c | 1 + libavformat/aadec.c| 1 + libavformat/asfdec_f.c | 1 + libavformat/asfdec_o.c | 2 +- libavformat/avidec.c | 1 +

[FFmpeg-devel] [PATCH 14/44] avformat/utils: Move ff_stream_encode_params_copy() to mux_utils.c

2022-05-07 Thread Andreas Rheinhardt
Only used by muxers. Signed-off-by: Andreas Rheinhardt --- libavformat/internal.h | 9 - libavformat/mux.h| 9 + libavformat/mux_utils.c | 28 libavformat/utils.c | 28 libavformat/webm_chunk.c | 1 + 5

[FFmpeg-devel] [PATCH 13/44] avformat/utils: Move av_stream_get_end_pts() to mux_utils.c

2022-05-07 Thread Andreas Rheinhardt
It is only to be used with muxers. Signed-off-by: Andreas Rheinhardt --- libavformat/mux_utils.c | 8 libavformat/utils.c | 8 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libavformat/mux_utils.c b/libavformat/mux_utils.c index 5930a7911a..2fa2ab5b0f 10064

[FFmpeg-devel] [PATCH 12/44] avformat/utils: Move avformat_query_codec() to mux_utils.c

2022-05-07 Thread Andreas Rheinhardt
It is obviously muxer-only. Signed-off-by: Andreas Rheinhardt --- libavformat/mux_utils.c | 18 ++ libavformat/utils.c | 18 -- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/libavformat/mux_utils.c b/libavformat/mux_utils.c index 83c1482540.

[FFmpeg-devel] [PATCH 11/44] avformat/utils: Move ff_format_output_open() to mux_utils.c

2022-05-07 Thread Andreas Rheinhardt
It is obviously a muxing-only function. Signed-off-by: Andreas Rheinhardt --- libavformat/fifo.c | 1 + libavformat/internal.h | 10 -- libavformat/mux.h | 10 ++ libavformat/mux_utils.c | 10 ++ libavformat/tee.c | 2 +- libavformat/utils.c | 10 -

[FFmpeg-devel] [PATCH 10/44] avformat/utils: Move creation-time functions to mux_utils

2022-05-07 Thread Andreas Rheinhardt
Only used by muxers. Signed-off-by: Andreas Rheinhardt --- libavformat/apetag.c| 2 +- libavformat/asfenc.c| 1 + libavformat/cafenc.c| 1 + libavformat/dvenc.c | 3 +-- libavformat/id3v2enc.c | 1 + libavformat/internal.h | 20 libavformat/lrcenc.c

[FFmpeg-devel] [PATCH 09/44] avformat/utils: Move ff_get_packet_palette() to rawutils.c

2022-05-07 Thread Andreas Rheinhardt
ff_get_packet_palette() and ff_reshuffle_raw_rgb() belong together: E.g. the former takes the return value of the latter as argument. So move ff_get_packet_palette() to rawutils.c (which consists solely of ff_reshuffle_raw_rgb()). Also add a separate header for these two functions. Signed-off-by:

[FFmpeg-devel] [PATCH 08/44] avformat/mux_utils: Move ff_format_shift_data to new file for mux utils

2022-05-07 Thread Andreas Rheinhardt
It is only used by muxers. Given that it is not part of the core muxing code and given that mux.c is already big enough, it is moved to a new file for utility functions for muxing. Signed-off-by: Andreas Rheinhardt --- libavformat/Makefile | 1 + libavformat/internal.h| 7 libavf

[FFmpeg-devel] [PATCH 07/44] avformat/utils: Move stream_options, avformat_new_stream to options.c

2022-05-07 Thread Andreas Rheinhardt
This is the appropriate place given that AVStream is about to become an AVOpt-enabled struct. Also move av_disposition_(to|from)_string, as these are tied to the disposition stream option. Signed-off-by: Andreas Rheinhardt --- libavformat/avidec.c | 2 +- libavformat/internal.h | 12 +++- l

[FFmpeg-devel] [PATCH 06/44] avformat/utils: Move ff_stream_add_bitstream_filter to mux.c

2022-05-07 Thread Andreas Rheinhardt
It is muxing-only; in fact, it should be considered part of the core muxing code. Signed-off-by: Andreas Rheinhardt --- libavformat/flvenc.c | 3 +-- libavformat/internal.h| 11 -- libavformat/ivfenc.c | 1 + libavformat/latmenc.c | 1 + libavformat/matroskaenc.c |

[FFmpeg-devel] [PATCH 05/44] avformat/mux: Move ff_choose_chroma_location to mxfenc, its only user

2022-05-07 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/internal.h | 5 - libavformat/mux.c | 31 --- libavformat/mxfenc.c | 31 ++- 3 files changed, 30 insertions(+), 37 deletions(-) diff --git a/libavformat/internal.h b/libavformat/

[FFmpeg-devel] [PATCH 04/44] avformat/mux: Move ff_choose_timebase to nutenc, its only user

2022-05-07 Thread Andreas Rheinhardt
(This function does not seem to abide by its documentation.) Signed-off-by: Andreas Rheinhardt --- libavformat/internal.h | 9 - libavformat/mux.c | 15 --- libavformat/nutenc.c | 22 +- 3 files changed, 21 insertions(+), 25 deletions(-) diff --gi

[FFmpeg-devel] [PATCH 03/44] avformat/internal: Move muxing-only functions to new mux.h header

2022-05-07 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavdevice/alsa_enc.c | 1 + libavdevice/opengl_enc.c | 1 + libavdevice/pulse_audio_enc.c| 1 + libavdevice/xv.c | 2 +- libavformat/dashenc.c| 1 + libavformat/gxfenc.c | 3 +- libavformat

[FFmpeg-devel] [PATCH 02/44] avformat/utils: Use av_realloc_array for reallocating array

2022-05-07 Thread Andreas Rheinhardt
Also improve the size check a bit; given that av_realloc_array() checks for overflow itself, we only have to check for nb_side_data + 1 still being representable in an int. But given that we can check for representability in size_t at no additional cost we do so as it leads to a nicer error code.

[FFmpeg-devel] [PATCH v2 09/11] libavformat/asfdec: ensure variables are initialized

2022-05-07 Thread softworkz
From: softworkz Signed-off-by: softworkz --- libavformat/asfdec_f.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c index 8283f245ab..024d77903b 100644 --- a/libavformat/asfdec_f.c +++ b/libavformat/asfdec_f.c @@ -968,6 +968,7 @@ static int as

[FFmpeg-devel] [PATCH v2 08/11] libavformat/asfdec: remove variable redefinition in inner scope

2022-05-07 Thread softworkz
From: softworkz Signed-off-by: softworkz --- libavformat/asfdec_f.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c index a7b5ffe465..8283f245ab 100644 --- a/libavformat/asfdec_f.c +++ b/libavformat/asfdec_f.c @@ -1181,7 +118

[FFmpeg-devel] [PATCH v2 07/11] libavformat/asfdec: fix macro definition and use

2022-05-07 Thread softworkz
From: softworkz Signed-off-by: softworkz --- libavformat/asfdec_f.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c index e87c78cd6c..a7b5ffe465 100644 --- a/libavformat/asfdec_f.c +++ b/libavformat/a

[FFmpeg-devel] [PATCH v2 06/11] libavformat/asfdec: remove unused parameters

2022-05-07 Thread softworkz
From: softworkz Signed-off-by: softworkz --- libavformat/asfdec_f.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c index 4c898ab3f2..e87c78cd6c 100644 --- a/libavformat/asfdec_f.c +++ b/libavfo

[FFmpeg-devel] [PATCH v2 10/11] libavformat/asfdec: fix parameter type in asf_read_stream_propertie()

2022-05-07 Thread softworkz
From: softworkz Signed-off-by: softworkz --- libavformat/asfdec_f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c index 024d77903b..b8140a6d57 100644 --- a/libavformat/asfdec_f.c +++ b/libavformat/asfdec_f.c @@ -323,7 +323,7

[FFmpeg-devel] [PATCH v2 05/11] libavformat/asfdec: implement parsing of GUID values

2022-05-07 Thread softworkz
From: softworkz Signed-off-by: softworkz --- libavformat/asfdec_f.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c index 58c424b565..4c898ab3f2 100644 --- a/libavformat/asfdec_f.c +++ b/libavformat/asfdec_f.c @@ -280,

[FFmpeg-devel] [PATCH v2 11/11] libavformat/asfdec: fix variable types and add checks for unsupported values

2022-05-07 Thread softworkz
From: softworkz Signed-off-by: softworkz --- libavformat/asfdec_f.c | 168 ++--- 1 file changed, 108 insertions(+), 60 deletions(-) diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c index b8140a6d57..c7141f6da1 100644 --- a/libavformat/asfdec_f.c

[FFmpeg-devel] [PATCH v2 04/11] libavformat/asfdec: fixing get_tag

2022-05-07 Thread softworkz
From: softworkz These three are closely related and can't be separated easily: In get_tag, the code was adding 22 bytes (in order to allow it to hold 64bit numbers as string) to the value len for creating creating a buffer. This was unnecessarily imposing a size-constraint on the value_len param

[FFmpeg-devel] [PATCH v2 03/11] libavformat/asfdec: fix type of value_len

2022-05-07 Thread softworkz
From: softworkz The value_len is an uint32 not an int32 per spec. That value must not be truncated, neither by casting to int, nor by any conditional checks, because at the end of get_tag, this value is needed to move forward in parsing. When the len value gets modified, the parsing may break. S

[FFmpeg-devel] [PATCH v2 02/11] libavformat/asfdec: fix get_value return type and add checks for

2022-05-07 Thread softworkz
From: softworkz unsupported values get_value had a return type of int, which means that reading QWORDS (case 4) was broken due to truncation of the result from avio_rl64(). Signed-off-by: softworkz --- libavformat/asfdec_f.c | 38 +- 1 file changed, 29 inse

[FFmpeg-devel] [PATCH v2 01/11] libavformat/asf: fix handling of byte array length values

2022-05-07 Thread softworkz
From: softworkz The spec allows attachment sizes of up to UINT32_MAX while we can handle only sizes up to INT32_MAX (in downstream code) The debug.assert in get_tag didn't really address this, and truncating the value_len in calling methods cannot be used because the length value is required in

[FFmpeg-devel] [PATCH v2 00/11] libavformat/asf: fix handling of byte array length values

2022-05-07 Thread ffmpegagent
The spec allows attachment sizes of up to UINT32_MAX while we can handle only sizes up to INT32_MAX (in downstream code) The debug.assert in get_tag didn't really address this, and truncating the value_len in calling methods cannot be used because the length value is required in order to continue

Re: [FFmpeg-devel] [PATCH] avcodec/jpeg2000: Fast fail if HTJ2K codeblocks are present.

2022-05-07 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Michael Niedermayer > Sent: Saturday, May 7, 2022 10:31 AM > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH] avcodec/jpeg2000: Fast fail if > HTJ2K codeblocks are present. >

Re: [FFmpeg-devel] [PATCH] avcodec/jpeg2000: Fast fail if HTJ2K codeblocks are present.

2022-05-07 Thread Michael Niedermayer
Hi before applying this Author: caleb If you want your full name there please resend this with your full name so its in git with your full name. It cannot be changed later if its pushed like this thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The educ

Re: [FFmpeg-devel] [PATCH] avcodec/jpeg2000: Fast fail if HTJ2K codeblocks are present.

2022-05-07 Thread Michael Niedermayer
On Fri, May 06, 2022 at 10:56:16AM -0700, Pierre-Anthony Lemieux wrote: > LGTM will apply thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Into a blind darkness they enter who follow after the Ignorance, they as if into a greater darkness enter who devote th