Re: [FFmpeg-devel] Is it ok to add G.722.1 decoder as external lib?

2019-09-17 Thread Hyun Yoo
According to wiki, g.722.1 is not variants of G.722 and they use different patented compression technologies. There is a reference code in ITU-T https://www.itu.int/rec/T-REC-G.722.1-200505-I/en and the freeswitch version is a wrapper with cleaner api. (I recently contacted the freeswitch guy and

Re: [FFmpeg-devel] [PATCH v2] doc: various spelling, grammar and formatting fixes

2019-09-17 Thread Gyan
On 17-09-2019 01:51 PM, Moritz Barsnick wrote: Signed-off-by: Moritz Barsnick --- doc/filters.texi | 69 doc/muxers.texi | 4 +-- 2 files changed, 37 insertions(+), 36 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index

[FFmpeg-devel] [PATCH 07/10] avformat/asfdec_o: Remove code duplication

2019-09-17 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/asfdec_o.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/libavformat/asfdec_o.c b/libavformat/asfdec_o.c index e90820373e..40641b8022 100644 --- a/libavformat/asfdec_o.c +++ b/libavformat/asfdec_o.c @@ -1549,14

[FFmpeg-devel] [PATCH 10/10] avutil/common: Fix undefined shift

2019-09-17 Thread Andreas Rheinhardt
av_mod_uintp2_c uses a bitwise AND with (1 << p) - 1 to clear the high bits of an unsigned int. But this is undefined if p == 31, because 1 is an int and 2^31 is not representable in an int. So make 1 unsigned. Signed-off-by: Andreas Rheinhardt --- libavutil/common.h | 2 +- 1 file changed, 1

[FFmpeg-devel] [PATCH 09/10] avcodec/opus_rc: Fix currently empty checks

2019-09-17 Thread Andreas Rheinhardt
FFMAX(a, 0) is always a if a is an unsigned type. In case of opus_rc, a is the difference of a signed and an unsigned type and the conversion to unsigned was surely unintended. Found via PVS-Studio (see issue #8156). Signed-off-by: Andreas Rheinhardt --- Casting is the easy solution to this

[FFmpeg-devel] [PATCH 08/10] avcodec/avpacket: Improve allocating packets

2019-09-17 Thread Andreas Rheinhardt
av_mallocz + av_init_packet leads to the same result as av_mallocz + av_packet_unref, but faster. Signed-off-by: Andreas Rheinhardt --- libavcodec/avpacket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c index

[FFmpeg-devel] [PATCH 03/10] avcodec/cbs_av1: Fix potential undefined shift

2019-09-17 Thread Andreas Rheinhardt
1 << w is undefined as soon as w is >= 31, as 1 has type int. In the case of cbs_av1_read_ns, w could potentially even be 32, so one has to use a 64bit type. (None of the current callers ever use arguments that are so large that the above scenario can happen, but this might change in the future.)

[FFmpeg-devel] [PATCH 06/10] avformat/asfdec_o: Don't reset twice

2019-09-17 Thread Andreas Rheinhardt
A variable has been assigned a value twice consecutively; essentially the same happens when one performs av_init_packet on an AVPacket after a call to av_packet_unref. Found via PVS-Studio (see ticket #8156). Signed-off-by: Andreas Rheinhardt --- libavformat/asfdec_o.c | 2 -- 1 file changed,

[FFmpeg-devel] [PATCH 04/10] avcodec/cbs_av1: Make overread check more robust

2019-09-17 Thread Andreas Rheinhardt
When performing a comparison of a signed int and an unsigned int, the signed int is first converted to an unsigned int, so that negative values are being treated as big, positive values. This can become a problem in an overread check, namely when an overread already happened. So change the type of

[FFmpeg-devel] [PATCH 05/10] avformat/asfdec_o: Unify switch cases

2019-09-17 Thread Andreas Rheinhardt
Found via PVS-Studio (see ticket #8156). Signed-off-by: Andreas Rheinhardt --- libavformat/asfdec_o.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavformat/asfdec_o.c b/libavformat/asfdec_o.c index 8e7f044ce9..26f9609f27 100644 --- a/libavformat/asfdec_o.c +++

[FFmpeg-devel] [PATCH 02/10] avcodec/mjpegdec: Unify switch statements

2019-09-17 Thread Andreas Rheinhardt
This has been forgotten in d5a3a20d. Found via PVS-Studio (see ticket #8156). Signed-off-by: Andreas Rheinhardt --- libavcodec/mjpegdec.c | 5 - 1 file changed, 5 deletions(-) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index f095afaed8..8b053613fc 100644 ---

[FFmpeg-devel] [PATCH 01/10] avcodec/cbs_h2645: Fix potential out-of-bounds array access

2019-09-17 Thread Andreas Rheinhardt
The maximum allowed index for an array access is FF_ARRAY_ELEMS - 1; yet the current code allowed FF_ARRAY_ELEMS. This wasn't dangerous in practice, as parameter sets with invalid ids were already filtered out during reading. Found via PVS-Studio (see ticket #8156). Signed-off-by: Andreas

Re: [FFmpeg-devel] [PATCH v2] Add option to log timing

2019-09-17 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Moritz Barsnick > Sent: Tuesday, September 17, 2019 11:07 PM > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH v2] Add option to log timing > > On Tue, Sep 17, 2019 at 00:07:37

Re: [FFmpeg-devel] [PATCH] lavf/mpegts: add support for AVS2

2019-09-17 Thread Carl Eugen Hoyos
Am Sa., 26. Mai 2018 um 08:50 Uhr schrieb hwren : > > Signed-off-by: hwren > --- > libavformat/mpegts.c | 1 + > libavformat/mpegts.h | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c > index 5f53f77..6674cd0 100644 > ---

[FFmpeg-devel] [PATCH] avutil/encryption_info: Don't pass NULL to memcpy

2019-09-17 Thread Andreas Rheinhardt
The pointer arguments to memcpy (and several other functions of the C standard library) are not allowed to be NULL, not even when the number of bytes to copy is zero. An AVEncryptionInitInfo's data pointer is explicitly allowed to be NULL and yet av_encryption_init_info_add_side_data

[FFmpeg-devel] [PATCH 1/2] avcodec/4xm: Check index in decode_i_block() also in the path where its not used.

2019-09-17 Thread Michael Niedermayer
Fixes: Infinite loop Fixes: signed integer overflow: 2147483644 + 16 cannot be represented in type 'int' Fixes: 16169/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FOURXM_fuzzer-5662570416963584 Fixes: 16782/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FOURXM_fuzzer-5743163859271680

[FFmpeg-devel] [PATCH 2/2] avcodec/motionpixels: Mark 2 functions as always_inline

2019-09-17 Thread Michael Niedermayer
Fixes: Timeout (30sec -> 25sec) Fixes: 17050/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MOTIONPIXELS_fuzzer-5719149803732992 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer ---

Re: [FFmpeg-devel] [PATCH v1 1/4] avutil/avstring: support input path is a null pointer or empty string

2019-09-17 Thread Limin Wang
On Tue, Sep 17, 2019 at 06:22:39PM +0200, Marton Balint wrote: > > > On Mon, 16 Sep 2019, Tomas Härdin wrote: > > >mån 2019-09-16 klockan 09:03 +0800 skrev lance.lmw...@gmail.com: > >>From: Limin Wang > >> > >>Signed-off-by: Limin Wang > >>--- > >> libavutil/avstring.c | 12 > >>

Re: [FFmpeg-devel] [PATCH v2] Add option to log timing

2019-09-17 Thread Moritz Barsnick
On Tue, Sep 17, 2019 at 00:07:37 +, Soft Works wrote: > This commit adds two logging flags: 'timing' and 'datetiming'. I like the whole idea. I haven't tested yet, but I will in a moment. > Usage: > ffmpeg -loglevel +timing > or > ffmpeg -loglevel +datetiming Have you considered what

Re: [FFmpeg-devel] [PATCH] libavformat/rtspdec: Don't send teardown if rtsp_hd_out is null

2019-09-17 Thread Ross Nicholson
This can be closed. New patch created which returns an error instead to prevent crash. On Thu, 12 Sep 2019 at 08:21, Ross Nicholson wrote: > Ping, any update? > > On Thu, 5 Sep 2019 at 06:33, Ross Nicholson wrote: > >> Hey All, >> >> Anything needed from me to progress this? >> >> Thanks in

[FFmpeg-devel] [PATCH 1/1] libavformat/rtsp: return error if rtsp_hd_out is null instead of crash

2019-09-17 Thread phunkyfish
--- libavformat/rtsp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index c153cac88b..6de090b7ce 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1315,6 +1315,8 @@ static int rtsp_send_cmd_with_content_async(AVFormatContext *s,

[FFmpeg-devel] [PATCH 0/1] libavformat/rtsp: return error if rtsp_hd_out is null instead of crash

2019-09-17 Thread phunkyfish
There is an issue in kodi where this value can be null, a previous patch attempted to fix this in rtspdec but the more correct solution is to return an error in that case phunkyfish (1): libavformat/rtsp: return error if rtsp_hd_out is null instead of crash libavformat/rtsp.c | 2 ++ 1 file

Re: [FFmpeg-devel] [PATCH v1 1/4] avutil/avstring: support input path is a null pointer or empty string

2019-09-17 Thread Marton Balint
On Mon, 16 Sep 2019, Tomas Härdin wrote: mån 2019-09-16 klockan 09:03 +0800 skrev lance.lmw...@gmail.com: From: Limin Wang Signed-off-by: Limin Wang --- libavutil/avstring.c | 12 libavutil/avstring.h | 13 + 2 files changed, 17 insertions(+), 8 deletions(-)

Re: [FFmpeg-devel] [PATCH 3/3] avfilter/x86/vf_eq: add SSE2 version

2019-09-17 Thread James Almer
On 9/17/2019 10:39 AM, Ting Fu wrote: > Signed-off-by: Ting Fu > --- > libavfilter/x86/vf_eq.asm| 19 +-- > libavfilter/x86/vf_eq_init.c | 20 > 2 files changed, 37 insertions(+), 2 deletions(-) > > diff --git a/libavfilter/x86/vf_eq.asm

[FFmpeg-devel] [PATCH 2/3] avfilter/x86/vf_eq: Change inline assembly into nasm code

2019-09-17 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/x86/Makefile | 3 +- libavfilter/x86/vf_eq.asm| 82 ++ libavfilter/x86/vf_eq.c | 96 libavfilter/x86/vf_eq_init.c | 55 + 4 files changed, 139 insertions(+),

[FFmpeg-devel] [PATCH 3/3] avfilter/x86/vf_eq: add SSE2 version

2019-09-17 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/x86/vf_eq.asm| 19 +-- libavfilter/x86/vf_eq_init.c | 20 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/libavfilter/x86/vf_eq.asm b/libavfilter/x86/vf_eq.asm index bf28691297..d6b51cf6df 100644 ---

[FFmpeg-devel] [PATCH 1/3] checkasm/vf_eq: add test for vf_eq

2019-09-17 Thread Ting Fu
Signed-off-by: Ting Fu --- libavfilter/vf_eq.c | 13 --- libavfilter/vf_eq.h | 1 + tests/checkasm/Makefile | 1 + tests/checkasm/checkasm.c | 3 ++ tests/checkasm/checkasm.h | 1 + tests/checkasm/vf_eq.c| 79 +++

[FFmpeg-devel] [PATCH] libavformat/hls.c: fix hls_read_seek return error when seek to first_timestamp

2019-09-17 Thread 1433100204
From: leizhai --- libavformat/hls.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavformat/hls.c b/libavformat/hls.c index 0611ddc6bb..4525862ee8 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -2237,7 +2237,12 @@ static int hls_read_seek(AVFormatContext

Re: [FFmpeg-devel] [PATCH 2/5] avformat/mov: Fix memleak

2019-09-17 Thread Michael Niedermayer
On Mon, Sep 16, 2019 at 05:54:59PM +0200, Andreas Rheinhardt wrote: > When the mov/mp4 demuxer encounters an error during decrypting a packet, > it returns the error, yet doesn't free the packet, so that the packet > leaks. This has been fixed in this commit. > > Fixes the memleaks from ticket

Re: [FFmpeg-devel] [PATCH 4/5] fftools/ffmpeg_opt: Fix signed integer overflow

2019-09-17 Thread Michael Niedermayer
On Mon, Sep 16, 2019 at 05:55:01PM +0200, Andreas Rheinhardt wrote: > Fixes ticket #8154. > > Signed-off-by: Andreas Rheinhardt > --- > fftools/ffmpeg_opt.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) will apply thx [...] -- Michael GnuPG fingerprint:

Re: [FFmpeg-devel] [PATCH 3/3] avformat/mov: Check for EOF in mov_read_meta()

2019-09-17 Thread Michael Niedermayer
On Sun, Sep 15, 2019 at 04:35:30PM -0300, James Almer wrote: > On 9/15/2019 4:34 PM, Michael Niedermayer wrote: > > On Sat, Aug 31, 2019 at 10:36:32AM -0300, James Almer wrote: > >> On 8/31/2019 5:47 AM, Michael Niedermayer wrote: > >>> On Fri, Aug 30, 2019 at 08:57:29PM -0300, James Almer wrote:

Re: [FFmpeg-devel] [PATCH 2/3] tools/target_dec_fuzzer: Adjust threshold for binkvideo

2019-09-17 Thread Michael Niedermayer
On Mon, Sep 16, 2019 at 09:51:15PM +1000, Peter Ross wrote: > On Sat, Sep 14, 2019 at 11:39:49PM +0200, Michael Niedermayer wrote: > > Fixes: Timeout (89sec -> 7sec) > > Fixes: > > 17035/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BINK_fuzzer-5737222422134784 > > > > Found-by: continuous

Re: [FFmpeg-devel] [PATCH 5/5] avformat/utils: Fix always true check

2019-09-17 Thread Michael Niedermayer
On Mon, Sep 16, 2019 at 05:55:02PM +0200, Andreas Rheinhardt wrote: > Found via PVS-Studio (ticket #8156). > > Signed-off-by: Andreas Rheinhardt > --- > libavformat/utils.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavformat/utils.c b/libavformat/utils.c >

Re: [FFmpeg-devel] [PATCH v3 2/5] avcodec/v210enc: make 8bit and 10bit function consistent

2019-09-17 Thread Limin Wang
On Mon, Sep 16, 2019 at 09:06:06PM +0200, Michael Niedermayer wrote: > On Sun, Sep 01, 2019 at 09:20:20PM +0800, lance.lmw...@gmail.com wrote: > > From: Limin Wang > > > > I have benchmarked the performance with c code and haven't see any > > performance impact. > > > > Signed-off-by: Limin

Re: [FFmpeg-devel] Is it ok to add G.722.1 decoder as external lib?

2019-09-17 Thread Moritz Barsnick
On Tue, Sep 17, 2019 at 09:52:48 +0200, Carl Eugen Hoyos wrote: > > But that said: ffmpeg already has a native G.722 encoder (and decoder), > > See: https://en.wikipedia.org/wiki/G.722.1 > The numbering... Yes, my next paragraph referred to that. But I just figured out that G.722 was apparently

[FFmpeg-devel] [PATCH v2] doc: various spelling, grammar and formatting fixes

2019-09-17 Thread Moritz Barsnick
Signed-off-by: Moritz Barsnick --- doc/filters.texi | 69 doc/muxers.texi | 4 +-- 2 files changed, 37 insertions(+), 36 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index bbfdad4d4d..6ed0e79f16 100644 --- a/doc/filters.texi

Re: [FFmpeg-devel] Is it ok to add G.722.1 decoder as external lib?

2019-09-17 Thread Andrey Semashev
On 2019-09-17 03:29, Hyun Yoo wrote: I implemented a g.722.1 decoder by linking FreeSwitch's libg722_1 as external lib like libilbc, libspeex(ex. configure --enable-libg722_1) (https://github.com/traviscross/freeswitch/tree/master/libs/libg722_1) I believe, the correct upstream link is

Re: [FFmpeg-devel] Is it ok to add G.722.1 decoder as external lib?

2019-09-17 Thread Carl Eugen Hoyos
> Am 17.09.2019 um 09:43 schrieb Moritz Barsnick : > But that said: ffmpeg already has a native G.722 encoder (and decoder), See: https://en.wikipedia.org/wiki/G.722.1 The numbering... Carl Eugen (The library is non-free and we cannot change that.)

Re: [FFmpeg-devel] Is it ok to add G.722.1 decoder as external lib?

2019-09-17 Thread Moritz Barsnick
On Tue, Sep 17, 2019 at 09:29:54 +0900, Hyun Yoo wrote: > I implemented a g.722.1 decoder by linking FreeSwitch's libg722_1 > as external lib like libilbc, libspeex(ex. configure --enable-libg722_1) > (https://github.com/traviscross/freeswitch/tree/master/libs/libg722_1) > > But I'm not sure about

Re: [FFmpeg-devel] Is it ok to add G.722.1 decoder as external lib?

2019-09-17 Thread Carl Eugen Hoyos
> Am 17.09.2019 um 02:29 schrieb Hyun Yoo : > > I implemented a g.722.1 decoder by linking FreeSwitch's libg722_1 > as external lib like libilbc, libspeex(ex. configure --enable-libg722_1) > (https://github.com/traviscross/freeswitch/tree/master/libs/libg722_1) > > But I'm not sure about the

Re: [FFmpeg-devel] Is it ok to add G.722.1 decoder as external lib?

2019-09-17 Thread Tomas Härdin
tis 2019-09-17 klockan 09:29 +0900 skrev Hyun Yoo: > I implemented a g.722.1 decoder by linking FreeSwitch's libg722_1 > as external lib like libilbc, libspeex(ex. configure --enable- > libg722_1) > (https://github.com/traviscross/freeswitch/tree/master/libs/libg722_1 > ) > > But I'm not sure