Re: [FFmpeg-devel] [PATCH v17 1/5] libavutil: Add wchartoutf8(), wchartoansi(), utf8toansi() and getenv_utf8()

2022-06-19 Thread Andreas Rheinhardt
nil-admir...@mailo.com: >> This forces allocations and frees in scenarios where this is wholly >> unnecessary. This can be avoided by adding a custom deallocator for >> strings returned via getenv_utf8: Namely a define/wrapper around av_free >> in the _WIN32 and a no-op else. > > Done: https://ffm

[FFmpeg-devel] [PATCH 5/5] libavfilter/vf_frei0r.c: Use UTF-8 version of getenv()

2022-06-19 Thread Andreas Rheinhardt
From: Nil Admirari --- This version has the advantage that duplicating the string is checked and that av_strdup(NULL) (whose behaviour is undocumented) is avoided. Here is a branch complete with these changes: https://github.com/mkver/FFmpeg/commits/getenv The Windows version has not been tested

Re: [FFmpeg-devel] FFmpeg 5.1

2022-06-19 Thread Neal Gompa
On Sun, Jun 19, 2022 at 4:59 PM Marton Balint wrote: > > > > On Thu, 9 Jun 2022, Neal Gompa wrote: > > > On Tue, Jun 7, 2022 at 7:35 AM Michael Niedermayer > > wrote: > >> > >> Hi all > >> > >> As was discussed previously the 5.1 release should be in june/july > >> That means in the next weeks pr

Re: [FFmpeg-devel] [PATCH 1/2] avformat/demux: Make read_frame_internal() return AVERREOR(EAGAIN) on stuck empty input parser

2022-06-19 Thread Andreas Rheinhardt
Marton Balint: > > > On Sat, 18 Jun 2022, Michael Niedermayer wrote: > >> On Fri, Jun 17, 2022 at 09:53:13PM +0200, Marton Balint wrote: >>> >>> >>> On Tue, 8 Feb 2022, Michael Niedermayer wrote: >>> Fixes: read_frame_internal() which does not return even though both demuxer and parser

Re: [FFmpeg-devel] [PATCH v19 3/5] fftools: Remove MAX_PATH limit and switch to UTF-8 versions of fopen() and getenv()

2022-06-19 Thread Michael Niedermayer
On Sun, Jun 19, 2022 at 02:40:54PM +0300, Nil Admirari wrote: > --- > fftools/cmdutils.c | 53 +--- > fftools/ffmpeg_opt.c | 9 ++-- > 2 files changed, 47 insertions(+), 15 deletions(-) breaks build on ubuntu CC fftools/ffmpeg_opt.o In file in

[FFmpeg-devel] [PATCH 2/2] avformat/mov: read PCM audio configuration box ('pcmC') if available

2022-06-19 Thread Marton Balint
From: Ivan Baykalov <4ru...@gmail.com> For ipcm and fpcm streams, big-endian format is the default, but it can be changed with additional 'pcmC' sub-atom of audio sample description. Details can be found in ISO/IEC 23003-5:2020 Fixes ticket #9763. Fixes ticket #9790. Patch simplified by Marton

[FFmpeg-devel] [PATCH 1/2] avformat/mov: factorize setting little endian PCM streams

2022-06-19 Thread Marton Balint
Signed-off-by: Marton Balint --- libavformat/mov.c | 51 +-- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 3ec0ea2361..0660a51492 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -15

Re: [FFmpeg-devel] [PATCH] avformat/mov: read PCM audio configuration box ('pcmC') if available

2022-06-19 Thread Marton Balint
On Tue, 7 Jun 2022, Ivan Baykalov wrote: For ipcm and fpcm streams, big-endian format is the default, but it can be changed with additional 'pcmC' sub-atom of audio sample description. Details can be found in ISO/IEC 23003-5:2020 Fixes ticket #9763 Fixes ticket #9790 Thanks for this, I h

Re: [FFmpeg-devel] [PATCH 2/4] avformat/mov: Add special case for slow duplication loop in mov_read_trun()

2022-06-19 Thread Michael Niedermayer
On Sun, Jun 19, 2022 at 12:17:54AM +0200, Marton Balint wrote: > > > On Sat, 18 Jun 2022, Michael Niedermayer wrote: > > > This extra code is ugly, better solution is welcome > > If you work on fixing these issues, it is kind of your job to find an > elegant and maintainable solution. If you ca

Re: [FFmpeg-devel] [PATCH] doc/examples/muxing: code rewrite with improved readability and fixed issues

2022-06-19 Thread Leo Izen
On 6/18/22 21:05, Paolo Prete wrote: A new patch is attached to this mail. Don't forget to add -v2 to your git format-patch line, which changes the patch header so it says [PATCH v2], which makes it easier for other readers to keep track of things. Also, it's usually a good idea to provide

Re: [FFmpeg-devel] FFmpeg 5.1

2022-06-19 Thread Marton Balint
On Thu, 9 Jun 2022, Neal Gompa wrote: On Tue, Jun 7, 2022 at 7:35 AM Michael Niedermayer wrote: Hi all As was discussed previously the 5.1 release should be in june/july That means in the next weeks probably! If you know of any regressions, security issues or other major bugs, please help

Re: [FFmpeg-devel] [PATCH] avformat/concat: fix missing metadata

2022-06-19 Thread Marton Balint
On Sun, 12 Jun 2022, Steven Hartland wrote: Remove return after copying extradata as this prevents metadata being duplicated correctly. The return there originated from commit b24d6c5303720fbd59cbd25c392229450660 and seems very much intentional to not overwrite stream parameters after

Re: [FFmpeg-devel] [PATCH] oss: account for sample size when computing timestamp

2022-06-19 Thread Marton Balint
On Wed, 15 Jun 2022, Matt Jacobson wrote: Hi, On Jun 1, 2022, at 5:06 AM, Matt Jacobson wrote: Don't assume each sample is one byte in size. Doing so results in wrong and occasionally non-monotonically-increasing timestamps. Fix nearby cosmetic typo. Friendly ping on this patch. Orig

Re: [FFmpeg-devel] [PATCH] SDL2 verison for pkg_config fallback

2022-06-19 Thread Martin Storsjö
On Mon, 20 Jun 2022, dvhh wrote: On Sun, 19 Jun 2022 17:46:58 +0200 Timo Rothenpieler wrote: On 17.06.2022 18:46, dvhh wrote: pkg_config fallback for SDL2 use 2.1.0 as max (excluded) version where the pkg_config specify 3.0.0 Correcting fallback version to be in line with the pkg_config vers

Re: [FFmpeg-devel] [PATCH v19 1/5] libavutil: Add wchartoutf8(), wchartoansi(), utf8toansi(), getenv_utf8() and freeenv_utf8()

2022-06-19 Thread Martin Storsjö
On Sun, 19 Jun 2022, Nil Admirari wrote: wchartoutf8() converts strings returned by WinAPI into UTF-8, which is FFmpeg's preffered encoding. Some external dependencies, such as AviSynth, are still not Unicode-enabled. utf8toansi() converts UTF-8 strings into ANSI in two steps: UTF-8 -> wchar_t

Re: [FFmpeg-devel] [PATCH] SDL2 verison for pkg_config fallback

2022-06-19 Thread dvhh
On Sun, 19 Jun 2022 17:46:58 +0200 Timo Rothenpieler wrote: > On 17.06.2022 18:46, dvhh wrote: > > pkg_config fallback for SDL2 use 2.1.0 as max (excluded) version > > where the pkg_config specify 3.0.0 > > Correcting fallback version to be in line with the pkg_config version > > Why? Any versio

[FFmpeg-devel] [PATCH] avcodec/libx265: make X265 CSP selection pixel format independent

2022-06-19 Thread Jan Ekström
Currently the format listing misses the J formats completely, yet they are marked as supported in the encoder. Thus to make the logic support them while not explicitly listing them, make the logic utilize chroma subsampling information in both width and height available through the pixel format des

Re: [FFmpeg-devel] [PATCH] SDL2 verison for pkg_config fallback

2022-06-19 Thread Timo Rothenpieler
On 17.06.2022 18:46, dvhh wrote: pkg_config fallback for SDL2 use 2.1.0 as max (excluded) version where the pkg_config specify 3.0.0 Correcting fallback version to be in line with the pkg_config version Why? Any version the new versioning scheme will have a pkg-config file.

Re: [FFmpeg-devel] [PATCH v3] avcodec/mfenc: set variable frame size flag.

2022-06-19 Thread Gyan Doshi
On 2022-06-19 03:15 pm, Gyan Doshi wrote: Default avctx->frame_size is 0 which led to init failure for audio MediaFoundation encoders since 827d6fe73d. The MF audio encoders accept variable frame size input buffers. Fixes #9802 Plan to push tomorrow. --- libavcodec/mfenc.c | 23 ++

[FFmpeg-devel] [PATCH] SDL2 verison for pkg_config fallback

2022-06-19 Thread dvhh
pkg_config fallback for SDL2 use 2.1.0 as max (excluded) version where the pkg_config specify 3.0.0 Correcting fallback version to be in line with the pkg_config version Signed-off-by: dvhh --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure in

Re: [FFmpeg-devel] [PATCH v17 1/5] libavutil: Add wchartoutf8(), wchartoansi(), utf8toansi() and getenv_utf8()

2022-06-19 Thread nil-admirari
> This forces allocations and frees in scenarios where this is wholly > unnecessary. This can be avoided by adding a custom deallocator for > strings returned via getenv_utf8: Namely a define/wrapper around av_free > in the _WIN32 and a no-op else. Done: https://ffmpeg.org/pipermail/ffmpeg-devel/2

Re: [FFmpeg-devel] [PATCH v17 1/5] libavutil: Add wchartoutf8(), wchartoansi(), utf8toansi() and getenv_utf8()

2022-06-19 Thread nil-admirari
> Note that this should be #if HAVE_GETENV - these constants are always > defined and evaluate to 0 or 1. No need to resend the patchset just for > that. (I added an explicit #include "config.h" above here too, just to > make it clearer.) Fixed: https://ffmpeg.org/pipermail/ffmpeg-devel/2022-Ju

Re: [FFmpeg-devel] [PATCH v17 4/5] libavformat: Remove MAX_PATH limit and use UTF-8 version of getenv()

2022-06-19 Thread nil-admirari
> FWIW - I wasn't entirely sure we can conclude that we always pass through > a case that initializes the err variable here, so just to be sure, I > locally amended this patch to initialize the err variable to 0 too. Fixed: https://ffmpeg.org/pipermail/ffmpeg-devel/2022-June/297806.html _

Re: [FFmpeg-devel] [PATCH v17 4/5] libavformat: Remove MAX_PATH limit and use UTF-8 version of getenv()

2022-06-19 Thread nil-admirari
> Thanks, adding #define WIN32_LEAN_AND_MEAN in wchar_filename.h fixes the > issue. Added WIN32_LEAN_AND_MEAN: https://ffmpeg.org/pipermail/ffmpeg-devel/2022-June/297804.html ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/ma

[FFmpeg-devel] [PATCH v19 4/5] libavformat: Remove MAX_PATH limit and use UTF-8 version of getenv()

2022-06-19 Thread Nil Admirari
1. getenv() is replaced with getenv_utf8() across libavformat. 2. New versions of AviSynth+ are now called with UTF-8 filenames. 3. Old versions of AviSynth are still using ANSI strings, but MAX_PATH limit on filename is removed. --- libavformat/avisynth.c| 39 +++---

[FFmpeg-devel] [PATCH v19 3/5] fftools: Remove MAX_PATH limit and switch to UTF-8 versions of fopen() and getenv()

2022-06-19 Thread Nil Admirari
--- fftools/cmdutils.c | 53 +--- fftools/ffmpeg_opt.c | 9 ++-- 2 files changed, 47 insertions(+), 15 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 5d7cdc3e10..69a6f54ea3 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmduti

[FFmpeg-devel] [PATCH v19 1/5] libavutil: Add wchartoutf8(), wchartoansi(), utf8toansi(), getenv_utf8() and freeenv_utf8()

2022-06-19 Thread Nil Admirari
wchartoutf8() converts strings returned by WinAPI into UTF-8, which is FFmpeg's preffered encoding. Some external dependencies, such as AviSynth, are still not Unicode-enabled. utf8toansi() converts UTF-8 strings into ANSI in two steps: UTF-8 -> wchar_t -> ANSI. wchartoansi() is responsible for th

[FFmpeg-devel] [PATCH v19 2/5] compat/w32dlfcn.h: Remove MAX_PATH limit and replace LoadLibraryExA with LoadLibraryExW

2022-06-19 Thread Nil Admirari
--- compat/w32dlfcn.h | 100 -- libavcodec/mf_utils.h | 1 + 2 files changed, 79 insertions(+), 22 deletions(-) diff --git a/compat/w32dlfcn.h b/compat/w32dlfcn.h index 52a94efafb..fb1aa1b72e 100644 --- a/compat/w32dlfcn.h +++ b/compat/w32dlfcn.h @@ -

[FFmpeg-devel] [PATCH v19 5/5] libavfilter/vf_frei0r.c: Use UTF-8 version of getenv()

2022-06-19 Thread Nil Admirari
--- libavfilter/vf_frei0r.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c index f11ae6e55c..c3176ea1f7 100644 --- a/libavfilter/vf_frei0r.c +++ b/libavfilter/vf_frei0r.c @@ -31,6 +31,7 @@ #include "libavu

[FFmpeg-devel] [PATCH v18 4/5] libavformat: Remove MAX_PATH limit and use UTF-8 version of getenv()

2022-06-19 Thread Nil Admirari
1. getenv() is replaced with getenv_utf8() across libavformat. 2. New versions of AviSynth+ are now called with UTF-8 filenames. 3. Old versions of AviSynth are still using ANSI strings, but MAX_PATH limit on filename is removed. --- libavformat/avisynth.c| 39 +++---

[FFmpeg-devel] [PATCH v18 5/5] libavfilter/vf_frei0r.c: Use UTF-8 version of getenv()

2022-06-19 Thread Nil Admirari
--- libavfilter/vf_frei0r.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c index f11ae6e55c..9a7a11604a 100644 --- a/libavfilter/vf_frei0r.c +++ b/libavfilter/vf_frei0r.c @@ -31,6 +31,7 @@ #include "libavutil

[FFmpeg-devel] [PATCH v18 2/5] compat/w32dlfcn.h: Remove MAX_PATH limit and replace LoadLibraryExA with LoadLibraryExW

2022-06-19 Thread Nil Admirari
--- compat/w32dlfcn.h | 100 -- libavcodec/mf_utils.h | 1 + 2 files changed, 79 insertions(+), 22 deletions(-) diff --git a/compat/w32dlfcn.h b/compat/w32dlfcn.h index 52a94efafb..fb1aa1b72e 100644 --- a/compat/w32dlfcn.h +++ b/compat/w32dlfcn.h @@ -

[FFmpeg-devel] [PATCH v18 3/5] fftools: Remove MAX_PATH limit and switch to UTF-8 versions of fopen() and getenv()

2022-06-19 Thread Nil Admirari
--- fftools/cmdutils.c | 53 +--- fftools/ffmpeg_opt.c | 9 ++-- 2 files changed, 47 insertions(+), 15 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 5d7cdc3e10..69a6f54ea3 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmduti

[FFmpeg-devel] [PATCH v18 1/5] libavutil: Add wchartoutf8(), wchartoansi(), utf8toansi(), getenv_utf8() and freeenv_utf8()

2022-06-19 Thread Nil Admirari
wchartoutf8() converts strings returned by WinAPI into UTF-8, which is FFmpeg's preffered encoding. Some external dependencies, such as AviSynth, are still not Unicode-enabled. utf8toansi() converts UTF-8 strings into ANSI in two steps: UTF-8 -> wchar_t -> ANSI. wchartoansi() is responsible for th

Re: [FFmpeg-devel] [PATCH v2] avcodec/mfenc: set variable frame size flag.

2022-06-19 Thread Andreas Rheinhardt
Gyan Doshi: > > > On 2022-06-19 03:36 pm, Gyan Doshi wrote: >> >> >> On 2022-06-19 02:54 pm, Andreas Rheinhardt wrote: >>> Andreas Rheinhardt: Gyan Doshi: > Default avctx->frame_size is 0 which led to init failure for > audio MediaFoundation encoders since 827d6fe73d. > > The

Re: [FFmpeg-devel] [PATCH v2] avcodec/mfenc: set variable frame size flag.

2022-06-19 Thread Gyan Doshi
On 2022-06-19 03:36 pm, Gyan Doshi wrote: On 2022-06-19 02:54 pm, Andreas Rheinhardt wrote: Andreas Rheinhardt: Gyan Doshi: Default avctx->frame_size is 0 which led to init failure for audio MediaFoundation encoders since 827d6fe73d. The MF audio encoders accept variable frame size input

Re: [FFmpeg-devel] [PATCH v2] avcodec/mfenc: set variable frame size flag.

2022-06-19 Thread Gyan Doshi
On 2022-06-19 02:54 pm, Andreas Rheinhardt wrote: Andreas Rheinhardt: Gyan Doshi: Default avctx->frame_size is 0 which led to init failure for audio MediaFoundation encoders since 827d6fe73d. The MF audio encoders accept variable frame size input buffers. Fixes #9802 --- libavcodec/mfenc

[FFmpeg-devel] [PATCH v3] avcodec/mfenc: set variable frame size flag.

2022-06-19 Thread Gyan Doshi
Default avctx->frame_size is 0 which led to init failure for audio MediaFoundation encoders since 827d6fe73d. The MF audio encoders accept variable frame size input buffers. Fixes #9802 --- libavcodec/mfenc.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --

Re: [FFmpeg-devel] [PATCH v2] avcodec/mfenc: set variable frame size flag.

2022-06-19 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Gyan Doshi: >> Default avctx->frame_size is 0 which led to init failure for >> audio MediaFoundation encoders since 827d6fe73d. >> >> The MF audio encoders accept variable frame size input buffers. >> >> Fixes #9802 >> --- >> libavcodec/mfenc.c | 2 +- >> 1 file changed, 1 in

Re: [FFmpeg-devel] [PATCH v2] avcodec/mfenc: set variable frame size flag.

2022-06-19 Thread Andreas Rheinhardt
Gyan Doshi: > Default avctx->frame_size is 0 which led to init failure for > audio MediaFoundation encoders since 827d6fe73d. > > The MF audio encoders accept variable frame size input buffers. > > Fixes #9802 > --- > libavcodec/mfenc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >

[FFmpeg-devel] [PATCH v2] avcodec/mfenc: set variable frame size flag.

2022-06-19 Thread Gyan Doshi
Default avctx->frame_size is 0 which led to init failure for audio MediaFoundation encoders since 827d6fe73d. The MF audio encoders accept variable frame size input buffers. Fixes #9802 --- libavcodec/mfenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mfenc.c

Re: [FFmpeg-devel] [PATCH v17 4/5] libavformat: Remove MAX_PATH limit and use UTF-8 version of getenv()

2022-06-19 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Martin Storsjö > Sent: Sunday, June 19, 2022 9:49 AM > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH v17 4/5] libavformat: Remove > MAX_PATH limit and use UTF-8 version of ge

Re: [FFmpeg-devel] [PATCH v17 4/5] libavformat: Remove MAX_PATH limit and use UTF-8 version of getenv()

2022-06-19 Thread Martin Storsjö
On Sat, 18 Jun 2022, Soft Works wrote: -Original Message- From: ffmpeg-devel On Behalf Of Martin Storsjö Sent: Sunday, June 19, 2022 12:24 AM To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH v17 4/5] libavformat: Remove MAX_PATH limit and use UTF-8 v

Re: [FFmpeg-devel] [PATCH v17 1/5] libavutil: Add wchartoutf8(), wchartoansi(), utf8toansi() and getenv_utf8()

2022-06-19 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Andreas Rheinhardt > Sent: Sunday, June 19, 2022 8:28 AM > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH v17 1/5] libavutil: Add > wchartoutf8(), wchartoansi(), utf8toansi() and getenv_utf8() > > Soft Works: > >