Re: [FFmpeg-devel] [PATCH] avutil/eval: make av_expr_eval more thread safe

2019-12-15 Thread Michael Niedermayer
On Sun, Dec 15, 2019 at 02:16:49AM +0100, Marton Balint wrote: > Unfortunately the ld() and st() operations store the variables in the AVExpr > context and not in the parser in order to keep the stored values between > evaluations (which is a rarely(?) used undocumented(?) feature of AVExpr). > >

Re: [FFmpeg-devel] [PATCH] avfilter/drawtext: special metadata fields to allow plotting source filename to output.

2019-12-15 Thread Alexandre Heitor Schmidt
On 14/12/2019 23:15, Marton Balint wrote: On Sat, 14 Dec 2019, Alexandre Heitor Schmidt wrote: avfilter/drawtext: Added two special metadata tags which can, be used by 'drawtext' filter and others to have access to source file path, and its basename. The new field AVPacket->source_file will con

Re: [FFmpeg-devel] [PATCH] avutil/eval: make av_expr_eval more thread safe

2019-12-15 Thread Marton Balint
On Sun, 15 Dec 2019, Michael Niedermayer wrote: On Sun, Dec 15, 2019 at 02:16:49AM +0100, Marton Balint wrote: Unfortunately the ld() and st() operations store the variables in the AVExpr context and not in the parser in order to keep the stored values between evaluations (which is a rarely(?

Re: [FFmpeg-devel] [PATCH 1/3] avutil/eval: Add av_expr_count_func() similar to av_expr_count_vars()

2019-12-15 Thread Marton Balint
On Fri, 6 Dec 2019, Michael Niedermayer wrote: Signed-off-by: Michael Niedermayer --- libavutil/eval.c | 28 libavutil/eval.h | 11 +++ 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/libavutil/eval.c b/libavutil/eval.c index 62d2ae938b..d527

Re: [FFmpeg-devel] [PATCH 1/4] avfilter/vf_interlace: restore lowpass mode constants

2019-12-15 Thread Marton Balint
On Fri, 13 Dec 2019, Marton Balint wrote: On Fri, 6 Dec 2019, Marton Balint wrote: The documentation still mentions numerical constants in addition to textual ones. It is also wrong to use distinct modes as flags and it disallows us to actually use the flags field for real flags in the

Re: [FFmpeg-devel] [PATCH] lavc/cbs_av1: Add read/write flag in log message

2019-12-15 Thread James Almer
On 12/15/2019 3:40 AM, Jun Zhao wrote: > From: Jun Zhao > > Before this change, the command: > > ffmpeg -y -i bear-av1.mp4 -c:v copy bear-av1.ivf -loglevel 99 > > always dump the log message like: > > AVBSFContext @ 0x55ff99e78e00] Frame 4: size 320x240 upscaled 320 render > 320x240 subsa

Re: [FFmpeg-devel] [PATCH 1/2] avutil/buffer: add av_buffer_pool_buffer_get_opaque

2019-12-15 Thread Nicolas George
James Almer (12019-12-14): > I'm not sure if this is a good idea. It takes any AVBufferRef as input, > so it will crash on pretty much every one not created by an AVBufferPool > (unless it checks that buf is not NULL before dereferencing it), or > return something unrelated otherwise. This is true

Re: [FFmpeg-devel] [PATCH 1/2] avutil/buffer: add av_buffer_pool_buffer_get_opaque

2019-12-15 Thread James Almer
On 12/15/2019 11:24 AM, Nicolas George wrote: > James Almer (12019-12-14): >> I'm not sure if this is a good idea. It takes any AVBufferRef as input, >> so it will crash on pretty much every one not created by an AVBufferPool >> (unless it checks that buf is not NULL before dereferencing it), or >>

Re: [FFmpeg-devel] [PATCH] avutil/eval: make av_expr_eval more thread safe

2019-12-15 Thread Michael Niedermayer
On Sun, Dec 15, 2019 at 01:52:52PM +0100, Marton Balint wrote: > > > On Sun, 15 Dec 2019, Michael Niedermayer wrote: > > >On Sun, Dec 15, 2019 at 02:16:49AM +0100, Marton Balint wrote: > >>Unfortunately the ld() and st() operations store the variables in the AVExpr > >>context and not in the par

Re: [FFmpeg-devel] [PATCH] avfilter/drawtext: special metadata fields to allow plotting source filename to output.

2019-12-15 Thread Michael Niedermayer
On Sat, Dec 14, 2019 at 10:59:31PM +, Alexandre Heitor Schmidt wrote: > avfilter/drawtext: Added two special metadata tags which can, be used by > 'drawtext' filter and others to have access to source file path, and its > basename. > > The new field AVPacket->source_file will contain a path to

Re: [FFmpeg-devel] [PATCH] avutil/eval: make av_expr_eval more thread safe

2019-12-15 Thread Marton Balint
On Sun, 15 Dec 2019, Michael Niedermayer wrote: On Sun, Dec 15, 2019 at 01:52:52PM +0100, Marton Balint wrote: On Sun, 15 Dec 2019, Michael Niedermayer wrote: On Sun, Dec 15, 2019 at 02:16:49AM +0100, Marton Balint wrote: Unfortunately the ld() and st() operations store the variables in

Re: [FFmpeg-devel] [PATCH] avfilter/drawtext: special metadata fields to allow plotting source filename to output.

2019-12-15 Thread Alexandre Heitor Schmidt
On 15/12/2019 15:04, Michael Niedermayer wrote: > On Sat, Dec 14, 2019 at 10:59:31PM +, Alexandre Heitor Schmidt wrote: >> avfilter/drawtext: Added two special metadata tags which can, be used by >> 'drawtext' filter and others to have access to source file path, and its >> basename. >> >> The

[FFmpeg-devel] [PATCH 1/5] avfilter/scale: store frame change eval

2019-12-15 Thread Gyan
1st of 5 factorized patches; supersedes https://patchwork.ffmpeg.org/patch/16272/ From 8ee0551584adc7020f485d7b9a237da7207fbdb6 Mon Sep 17 00:00:00 2001 From: Gyan Doshi Date: Sun, 8 Dec 2019 15:43:42 +0530 Subject: [PATCH 1/5] avfilter/scale: store frame change eval Better readability and allow

[FFmpeg-devel] [PATCH 4/5] avfilter/scale: add function to check expressions

2019-12-15 Thread Gyan
4th of 5 factorized patches; supersedes https://patchwork.ffmpeg.org/patch/16272/ From 4428afaba039756f47c177f2533fe23c0bfb4bc1 Mon Sep 17 00:00:00 2001 From: Gyan Doshi Date: Fri, 13 Dec 2019 00:12:53 +0530 Subject: [PATCH 4/5] avfilter/scale: add function to check expressions Allows finer iden

[FFmpeg-devel] [PATCH 3/5] avfilter/scale: separate exprs parse and eval

2019-12-15 Thread Gyan
3rd of 5 factorized patches; supersedes https://patchwork.ffmpeg.org/patch/16272/ From 00b54948b88ae60aa3ab7c158b98e55cb8b967d3 Mon Sep 17 00:00:00 2001 From: Gyan Doshi Date: Thu, 12 Dec 2019 22:54:31 +0530 Subject: [PATCH 3/5] avfilter/scale: separate exprs parse and eval Will allow adding ani

[FFmpeg-devel] [PATCH 2/5] avfilter/scale2ref: update links and re-eval expr upon ref frame change

2019-12-15 Thread Gyan
2nd of 5 factorized patches; supersedes https://patchwork.ffmpeg.org/patch/16272/ From f5055424fb9988644d413c2599fe7ed4526c8334 Mon Sep 17 00:00:00 2001 From: Gyan Doshi Date: Sun, 8 Dec 2019 15:54:28 +0530 Subject: [PATCH 2/5] avfilter/scale2ref: update links and re-eval expr upon ref frame cha

[FFmpeg-devel] [PATCH 5/5] avfilter/scale: add animation support

2019-12-15 Thread Gyan
5th of 5 factorized patches; supersedes https://patchwork.ffmpeg.org/patch/16272/ From a31f4fe482aaa1574ebb17ff5820a3a364b79fff Mon Sep 17 00:00:00 2001 From: Gyan Doshi Date: Sun, 15 Dec 2019 18:56:06 +0530 Subject: [PATCH 5/5] avfilter/scale: add animation support Width and height expressions

Re: [FFmpeg-devel] [PATCH v2] avfilter/formats: optimize ff_all_formats

2019-12-15 Thread Tomas Härdin
tis 2019-12-10 klockan 22:14 +0800 skrev zhilizhao: > > On Dec 10, 2019, at 4:20 AM, Tomas Härdin wrote: > > > > lör 2019-12-07 klockan 01:06 +0800 skrev Zhao Zhili: > > > This is a micro-optimization. Saving almost 200 reallocations makes > > > it > > > worth a try. > > > --- > > > fix commit me

Re: [FFmpeg-devel] [PATCH v2] avfilter/formats: optimize ff_all_formats

2019-12-15 Thread Nicolas George
Tomas Härdin (12019-12-15): > Perhaps someone with more insight into lavfi wants to comment? I intend to look at it, but it have been a hectic week here. Regards, -- Nicolas George signature.asc Description: PGP signature ___ ffmpeg-devel mailing

Re: [FFmpeg-devel] [WIP][RFC][PATCH] avcodec: add BRAW video decoder

2019-12-15 Thread Paul B Mahol
On 12/15/19, Kieran Kunhya wrote: >> +static av_cold void braw_static_init(void) >> +{ >> +INIT_VLC_STATIC(&dc_vlc, 13, 16, dc_bits, 1, 1, dc_codes, 2, 2, >> 8192); >> +INIT_VLC_STATIC(&ac_vlc, 18, 194, ac_bits, 1, 1, ac_codes, 4, 4, >> 262144); >> +} >> + > >> +.caps_internal= FF_

Re: [FFmpeg-devel] [PATCH] avutil/eval: make av_expr_eval more thread safe

2019-12-15 Thread Michael Niedermayer
On Sun, Dec 15, 2019 at 04:24:11PM +0100, Marton Balint wrote: > > > On Sun, 15 Dec 2019, Michael Niedermayer wrote: > > >On Sun, Dec 15, 2019 at 01:52:52PM +0100, Marton Balint wrote: > >> > >> > >>On Sun, 15 Dec 2019, Michael Niedermayer wrote: > >> > >>>On Sun, Dec 15, 2019 at 02:16:49AM +010

Re: [FFmpeg-devel] [PATCH 1/2] checkasm: aacpsdsp: Tolerate extra intermediate precision in stereo_interpolate

2019-12-15 Thread Martin Storsjö
On Tue, 10 Dec 2019, Martin Storsjö wrote: The stereo_interpolate functions add h_step to the values h BUF_SIZE times. Within the stereo_interpolate C functions, the values h (h0-h3, h00-h13) are declared as local float variables, but the compiler is free to keep them in a register with extra pr

Re: [FFmpeg-devel] [PATCH 3/3] ffprobe: Fix fate tests for ffprobe in cases where TARGET_PATH differs from the current path

2019-12-15 Thread Martin Storsjö
On Tue, 10 Dec 2019, Martin Storsjö wrote: In these cases, we must pass the full path of the file to ffprobe (as the current working dir on the remote system, e.g. when invoked with "ssh remote ffprobe ..." isn't the wanted one). The input filename passed to ffprobe is also included in the outp

[FFmpeg-devel] [PATCHv3] fate: Add an option for disabling the 2k/4k tests

2019-12-15 Thread Martin Storsjö
When testing on a memory limited system, these tests consume a significant amount of memory and can often fail if testing by running multiple processes in parallel. --- Made it possible to override the setting when running make, by setting LARGE_TESTS. The solution looks a bit different from what I

[FFmpeg-devel] [PATCH 2/2] avcodec/h264_ps: Provide more details with "Truncated VUI" Message

2019-12-15 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer --- libavcodec/h264_ps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c index 74f12f8979..410e767cd9 100644 --- a/libavcodec/h264_ps.c +++ b/libavcodec/h264_ps.c @@ -186,7 +186,7 @@ static inline i

[FFmpeg-devel] [PATCH 1/2] avcodec/h264_ps: Check for truncation at fixed_frame_rate_flag

2019-12-15 Thread Michael Niedermayer
Fixes: Ticket7249 (No longer displaying a scary red message) Signed-off-by: Michael Niedermayer --- libavcodec/h264_ps.c | 4 1 file changed, 4 insertions(+) diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c index e8738d8502..74f12f8979 100644 --- a/libavcodec/h264_ps.c +++ b/libavc

Re: [FFmpeg-devel] [PATCH] lavf/movenc: Replace dts by pts to calculate duration

2019-12-15 Thread Martin Storsjö
On Tue, 10 Dec 2019, manuelyuan wrote: I opened a ticket in https://trac.ffmpeg.org/ticket/8420 my patch may be not absolutely right, but this problem should get your attention, thank you I sent a patch that doesn't mess up all the details in the fragmentation, but only changes the calculati

[FFmpeg-devel] [PATCH] movenc: Write durations based on pts into mvhd/mdhd/tkhd/elst

2019-12-15 Thread Martin Storsjö
Keep all the existing data fields as they are (there's lots and lots of nontrivial calculation and heuristics based on them in their current form), but derive the duration as the difference between the pts of the first packet to the maximum pts+duration (not necessarily the last packet); use this d

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/h264_ps: Check for truncation at fixed_frame_rate_flag

2019-12-15 Thread James Almer
On 12/15/2019 7:00 PM, Michael Niedermayer wrote: > Fixes: Ticket7249 (No longer displaying a scary red message) > > Signed-off-by: Michael Niedermayer > --- > libavcodec/h264_ps.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c > index e

Re: [FFmpeg-devel] [WIP][RFC][PATCH] avcodec: add BRAW video decoder

2019-12-15 Thread Kieran Kunhya
> There is thread_once there. And similar is done for imm4. > So do not see what you complain about. I am clearly blind. sorry Kieran ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe

Re: [FFmpeg-devel] [PATCH] lavc/cbs_av1: Add read/write flag in log message

2019-12-15 Thread Michael Niedermayer
On Sun, Dec 15, 2019 at 02:40:52PM +0800, Jun Zhao wrote: > From: Jun Zhao > > Before this change, the command: > > ffmpeg -y -i bear-av1.mp4 -c:v copy bear-av1.ivf -loglevel 99 > > always dump the log message like: > > AVBSFContext @ 0x55ff99e78e00] Frame 4: size 320x240 upscaled 320 rende

Re: [FFmpeg-devel] [PATCH v1] avcodec/bsf: replace ctx->internal-> with in-> for better readability

2019-12-15 Thread Michael Niedermayer
On Sat, Dec 14, 2019 at 11:03:10PM +0800, lance.lmw...@gmail.com wrote: > From: Limin Wang > > Signed-off-by: Limin Wang > --- > libavcodec/bsf.c | 31 +-- > 1 file changed, 17 insertions(+), 14 deletions(-) sounds like a good idea thx [...] -- Michael GnuPG

Re: [FFmpeg-devel] [PATCH v1] avcodec/bsf: replace ctx->internal-> with in-> for better readability

2019-12-15 Thread James Almer
On 12/14/2019 12:03 PM, lance.lmw...@gmail.com wrote: > From: Limin Wang > > Signed-off-by: Limin Wang > --- > libavcodec/bsf.c | 31 +-- > 1 file changed, 17 insertions(+), 14 deletions(-) > > diff --git a/libavcodec/bsf.c b/libavcodec/bsf.c > index c1653cd..a5a5a0

Re: [FFmpeg-devel] [PATCH v2 02/14] bytestream: Make get_bytes_left compatible with overread

2019-12-15 Thread Michael Niedermayer
On Sat, Dec 14, 2019 at 11:19:14PM +0100, Andreas Rheinhardt wrote: > bytestream2_get_bytes_left returns an unsigned int; as a result, > it returns big positive numbers if an overread already happened, > making it unsuitable for scenarios where one wants to allow this > in a controlled way (because

Re: [FFmpeg-devel] [PATCH v2 01/14] h264_mp4toannexb: Remove unnecessary check

2019-12-15 Thread Michael Niedermayer
On Sat, Dec 14, 2019 at 11:19:13PM +0100, Andreas Rheinhardt wrote: > There can be at most 31 SPS and 255 PPS in the mp4/Matroska extradata. > Given that each has a size of at most 2^16-1, the length of the output > derived from these parameter sets can never overflow an ordinary 32 bit > integer.

Re: [FFmpeg-devel] [PATCH v2 02/14] bytestream: Make get_bytes_left compatible with overread

2019-12-15 Thread Andreas Rheinhardt
On Sun, Dec 15, 2019 at 11:53 PM Michael Niedermayer wrote: > On Sat, Dec 14, 2019 at 11:19:14PM +0100, Andreas Rheinhardt wrote: > > bytestream2_get_bytes_left returns an unsigned int; as a result, > > it returns big positive numbers if an overread already happened, > > making it unsuitable for

Re: [FFmpeg-devel] [PATCH v2 02/14] bytestream: Make get_bytes_left compatible with overread

2019-12-15 Thread Michael Niedermayer
On Mon, Dec 16, 2019 at 12:05:52AM +0100, Andreas Rheinhardt wrote: > On Sun, Dec 15, 2019 at 11:53 PM Michael Niedermayer > wrote: > > > On Sat, Dec 14, 2019 at 11:19:14PM +0100, Andreas Rheinhardt wrote: > > > bytestream2_get_bytes_left returns an unsigned int; as a result, > > > it returns big

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/h264_ps: Check for truncation at fixed_frame_rate_flag

2019-12-15 Thread Carl Eugen Hoyos
Am So., 15. Dez. 2019 um 23:25 Uhr schrieb James Almer : > > On 12/15/2019 7:00 PM, Michael Niedermayer wrote: > > Fixes: Ticket7249 (No longer displaying a scary red message) > > > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/h264_ps.c | 4 > > 1 file changed, 4 insertions(+)

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/h264_ps: Check for truncation at fixed_frame_rate_flag

2019-12-15 Thread James Almer
On 12/15/2019 8:50 PM, Carl Eugen Hoyos wrote: > Am So., 15. Dez. 2019 um 23:25 Uhr schrieb James Almer : >> >> On 12/15/2019 7:00 PM, Michael Niedermayer wrote: >>> Fixes: Ticket7249 (No longer displaying a scary red message) >>> >>> Signed-off-by: Michael Niedermayer >>> --- >>> libavcodec/h264

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/h264_ps: Check for truncation at fixed_frame_rate_flag

2019-12-15 Thread Carl Eugen Hoyos
Am Mo., 16. Dez. 2019 um 01:00 Uhr schrieb James Almer : > > On 12/15/2019 8:50 PM, Carl Eugen Hoyos wrote: > > Am So., 15. Dez. 2019 um 23:25 Uhr schrieb James Almer : > >> > >> On 12/15/2019 7:00 PM, Michael Niedermayer wrote: > >>> Fixes: Ticket7249 (No longer displaying a scary red message) > >

[FFmpeg-devel] [PATCH 00/16] Memleaks in hlsenc

2019-12-15 Thread Andreas Rheinhardt
This patchset is primarily concerned with fixing memleaks in the hls muxer. I was drawn to this by a memleak created by ed897633; it is fixed in the first patch.* Looking through the code I found more improvable stuff; and some of this is fixed in the patches that follow. Yet there is still stuff

[FFmpeg-devel] [PATCH 04/16] avformat/hlsenc: Fix leak of options when initializing muxing fails

2019-12-15 Thread Andreas Rheinhardt
hls_mux_init() currently leaks an AVDictionary if opening a dynamic buffer fails or if avformat_init_output fails. This has been fixed by moving the initialization resp. the freeing of the dictionary around: In the former case to a place after opening the dynamic buffer, in the latter to a place be

[FFmpeg-devel] [PATCH 10/16] avformat/hlsenc: Fix return value from localtime_r failure

2019-12-15 Thread Andreas Rheinhardt
"If an error is detected, localtime_r() shall return a null pointer and set errno to indicate the error." Yet in case this happened in hls_init(), AVERROR(ENOMEM) has been returned. Signed-off-by: Andreas Rheinhardt --- libavformat/hlsenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[FFmpeg-devel] [PATCH 03/16] avformat/hlsenc: Only allocate when data is known to be needed

2019-12-15 Thread Andreas Rheinhardt
hls_init() would allocate a buffer, although it is only needed in one of two branches that follow. This commit moves the allocation to the branch that actually needs the buffer. Signed-off-by: Andreas Rheinhardt --- libavformat/hlsenc.c | 11 +-- 1 file changed, 5 insertions(+), 6 deleti

[FFmpeg-devel] [PATCH 02/16] avformat/hlsenc: Fix typo in error message

2019-12-15 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/hlsenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 2b87070d62..965c05c560 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -2079,7 +2079,7 @@ static int par

[FFmpeg-devel] [PATCH 11/16] avformat/hlsenc: Fix memleaks with repeating parameters

2019-12-15 Thread Andreas Rheinhardt
When a parameter like e.g. language is contained more than once in the part of var_stream_map pertaining to a single VariantStream, the later one just overwrites the pointer to the earlier one, leading to a memleak. This commit changes this by handling the situation gracefully: The earlier string i

[FFmpeg-devel] [PATCH 01/16] avformat/hlsenc: Fix leak of child AVFormatContext

2019-12-15 Thread Andreas Rheinhardt
Before ed897633, the hls muxer would free its child AVFormatContexts and reset the pointer to these contexts to NULL immediately afterwards; ed897633 moved the former to later (into a separate function), but kept the resetting, ensuring that the child context leaks. Signed-off-by: Andreas Rheinhar

[FFmpeg-devel] [PATCH 05/16] avformat/hlsenc: Fix leak of options when writing packets

2019-12-15 Thread Andreas Rheinhardt
Under certain circumstances hls_write_packet() would add options to an AVDictionary. Said dictionary was never explicitly freed, instead it was presumed that these options would be consumed when opening a new IO-context. This left several possibilities for memleaks: a) When no new IO-context would

[FFmpeg-devel] [PATCH 07/16] avformat/hlsenc: Fix potential segfault upon allocation failure

2019-12-15 Thread Andreas Rheinhardt
The hls muxer allocates an array of VariantStreams, a structure that contains pointers to objects that need to be freed on their own. This means that the number of allocated VariantStreams needs to be correct when they are freed; yet the number of VariantStreams is set in update_variant_stream_info

[FFmpeg-devel] [PATCH 14/16] avformat/hlsenc: Localize initialization of subtitle streams

2019-12-15 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/hlsenc.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index c612c3bbb8..16595f02cd 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -2684,9 +2684,7 @

[FFmpeg-devel] [PATCH 13/16] avformat/hlsenc: Fix check for presence of webvtt muxer

2019-12-15 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/hlsenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index d738b08a3f..c612c3bbb8 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -2819,7 +2819,7 @@ static int hls

[FFmpeg-devel] [PATCH 06/16] avformat/hlsenc: Use smaller scope for some variables

2019-12-15 Thread Andreas Rheinhardt
Several variables which are only used when the HLS_SINGLE_FILE bit is not set have nevertheless been set regardless of whether this bit is set. This has been changed; futhermore, these variables have been moved into a smaller scope. Signed-off-by: Andreas Rheinhardt --- libavformat/hlsenc.c | 20

[FFmpeg-devel] [PATCH 12/16] avformat/hlsenc: Unconditionally free some strings

2019-12-15 Thread Andreas Rheinhardt
hls_init() would at first allocate the vtt_basename string, then allocate the vtt_m3u8_name string followed by several operations that may fail and then open the subtitles' output context. Yet upon freeing, these strings were only freed when the subtitles' output context existed, ensuring that they

[FFmpeg-devel] [PATCH 08/16] avformat/hlsenc: Add deinit function

2019-12-15 Thread Andreas Rheinhardt
This fixes memleaks in instances such as: a) When an allocation fails at one of the two places in hls_init() where the error is returned immediately without goto fail first. b) When an error happens when writing the header. c) When an allocation fails at one of the three places in hls_write_trailer

[FFmpeg-devel] [PATCH 16/16] avformat/hlsenc: Cosmetics

2019-12-15 Thread Andreas Rheinhardt
Mainly includes reindentation, moving variables into smaller scopes (in particular when this allows to remove unnecessary initializations) and also returning directly (i.e. without a goto fail when possible). Signed-off-by: Andreas Rheinhardt --- libavformat/hlsenc.c | 175 +-

[FFmpeg-devel] [PATCH 15/16] avformat/hlsenc: Factor check out of loop

2019-12-15 Thread Andreas Rheinhardt
The check will be true at most once anyway. Signed-off-by: Andreas Rheinhardt --- libavformat/hlsenc.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 16595f02cd..62a52b176f 100644 --- a/libavformat/hlsenc.c

[FFmpeg-devel] [PATCH 09/16] avformat/hlsenc: Check some unchecked allocations

2019-12-15 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/hlsenc.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 8f142fd475..b3f9582267 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -1614,6 +1614,8 @@

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/h264_ps: Check for truncation at fixed_frame_rate_flag

2019-12-15 Thread James Almer
On 12/15/2019 9:03 PM, Carl Eugen Hoyos wrote: > Am Mo., 16. Dez. 2019 um 01:00 Uhr schrieb James Almer : >> >> On 12/15/2019 8:50 PM, Carl Eugen Hoyos wrote: >>> Am So., 15. Dez. 2019 um 23:25 Uhr schrieb James Almer : On 12/15/2019 7:00 PM, Michael Niedermayer wrote: > Fixes: Ticket

Re: [FFmpeg-devel] [PATCH v1] avcodec/bsf: replace ctx->internal-> with in-> for better readability

2019-12-15 Thread Limin Wang
On Sun, Dec 15, 2019 at 07:49:41PM -0300, James Almer wrote: > On 12/14/2019 12:03 PM, lance.lmw...@gmail.com wrote: > > From: Limin Wang > > > > Signed-off-by: Limin Wang > > --- > > libavcodec/bsf.c | 31 +-- > > 1 file changed, 17 insertions(+), 14 deletions(-) >

Re: [FFmpeg-devel] [PATCH 01/16] avformat/hlsenc: Fix leak of child AVFormatContext

2019-12-15 Thread Steven Liu
> 在 2019年12月16日,08:04,Andreas Rheinhardt 写道: > > Before ed897633, the hls muxer would free its child AVFormatContexts > and reset the pointer to these contexts to NULL immediately afterwards; > ed897633 moved the former to later (into a separate function), but kept > the resetting, ensuring tha

Re: [FFmpeg-devel] [PATCH 02/16] avformat/hlsenc: Fix typo in error message

2019-12-15 Thread Steven Liu
> 在 2019年12月16日,08:04,Andreas Rheinhardt 写道: > > Signed-off-by: Andreas Rheinhardt > --- > libavformat/hlsenc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c > index 2b87070d62..965c05c560 100644 > --- a/libavformat/hlsenc.

Re: [FFmpeg-devel] [PATCH 10/16] avformat/hlsenc: Fix return value from localtime_r failure

2019-12-15 Thread Steven Liu
> 在 2019年12月16日,08:04,Andreas Rheinhardt 写道: > > "If an error is detected, localtime_r() shall return a null pointer > and set errno to indicate the error." Yet in case this happened in > hls_init(), AVERROR(ENOMEM) has been returned. > > Signed-off-by: Andreas Rheinhardt > --- > libavformat/

Re: [FFmpeg-devel] [PATCH 11/16] avformat/hlsenc: Fix memleaks with repeating parameters

2019-12-15 Thread Steven Liu
> 在 2019年12月16日,08:04,Andreas Rheinhardt 写道: > > When a parameter like e.g. language is contained more than once in the > part of var_stream_map pertaining to a single VariantStream, the later > one just overwrites the pointer to the earlier one, leading to a > memleak. This commit changes this

Re: [FFmpeg-devel] [PATCH 06/16] avformat/hlsenc: Use smaller scope for some variables

2019-12-15 Thread Steven Liu
> 在 2019年12月16日,08:04,Andreas Rheinhardt 写道: > > Several variables which are only used when the HLS_SINGLE_FILE bit is > not set have nevertheless been set regardless of whether this bit is set. > This has been changed; futhermore, these variables have been moved into > a smaller scope. > > Si

Re: [FFmpeg-devel] [PATCH 12/16] avformat/hlsenc: Unconditionally free some strings

2019-12-15 Thread Steven Liu
> 在 2019年12月16日,08:04,Andreas Rheinhardt 写道: > > hls_init() would at first allocate the vtt_basename string, then > allocate the vtt_m3u8_name string followed by several operations that > may fail and then open the subtitles' output context. Yet upon freeing, > these strings were only freed whe

Re: [FFmpeg-devel] [PATCH 13/16] avformat/hlsenc: Fix check for presence of webvtt muxer

2019-12-15 Thread Steven Liu
> 在 2019年12月16日,08:04,Andreas Rheinhardt 写道: > > Signed-off-by: Andreas Rheinhardt > --- > libavformat/hlsenc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c > index d738b08a3f..c612c3bbb8 100644 > --- a/libavformat/hlsenc.

Re: [FFmpeg-devel] [PATCH 06/16] avformat/hlsenc: Use smaller scope for some variables

2019-12-15 Thread Andreas Rheinhardt
On Mon, Dec 16, 2019 at 4:07 AM Steven Liu wrote: > > > > 在 2019年12月16日,08:04,Andreas Rheinhardt > 写道: > > > > Several variables which are only used when the HLS_SINGLE_FILE bit is > > not set have nevertheless been set regardless of whether this bit is set. > > This has been changed; futhermore

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/h264_ps: Check for truncation at fixed_frame_rate_flag

2019-12-15 Thread James Almer
On 12/15/2019 7:00 PM, Michael Niedermayer wrote: > Fixes: Ticket7249 (No longer displaying a scary red message) > > Signed-off-by: Michael Niedermayer > --- > libavcodec/h264_ps.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c > index e

Re: [FFmpeg-devel] [PATCH v2] lavc/cbs_h2645_syntax_template: Fix memleak

2019-12-15 Thread Andriy Gelman
On Fri, 06. Dec 14:22, Andriy Gelman wrote: > From: Andriy Gelman > > payload_count is used to track the number of SEI payloads. It is also > used to free the SEIs in cbs_h264_free_sei()/cbs_h265_free_sei(). > > Currently, payload_count is set after for loop is completed. Hence if > there is an

Re: [FFmpeg-devel] [PATCH] lavc/cbs_av1: Add read/write flag in log message

2019-12-15 Thread myp...@gmail.com
On Mon, Dec 16, 2019 at 6:37 AM Michael Niedermayer wrote: > > On Sun, Dec 15, 2019 at 02:40:52PM +0800, Jun Zhao wrote: > > From: Jun Zhao > > > > Before this change, the command: > > > > ffmpeg -y -i bear-av1.mp4 -c:v copy bear-av1.ivf -loglevel 99 > > > > always dump the log message like: > >

[FFmpeg-devel] [PATCH v2] avcodec/bsf: replace ctx->internal-> with bsfi-> for better readability

2019-12-15 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavcodec/bsf.c | 49 +++-- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/libavcodec/bsf.c b/libavcodec/bsf.c index c1653cd..c6dce93 100644 --- a/libavcodec/bsf.c +++ b/libavcodec/bsf.c

Re: [FFmpeg-devel] [PATCH v5] avformat/mov: Memory optimization with QuickTime/MP4

2019-12-15 Thread Jörg Beckmann
Is there still something wrong with this patch? Cheers, Jörg > -Ursprüngliche Nachricht- > Von: ffmpeg-devel Im Auftrag von Jörg > Beckmann > Gesendet: Montag, 9. Dezember 2019 16:05 > An: ffmpeg-devel@ffmpeg.org > Betreff: [FFmpeg-devel] [PATCH v5] avformat/mov: Memory optimization with