Re: [FFmpeg-devel] [PATCH v2 1/2] avformat/url: check double dot is not to parent directory

2020-07-24 Thread 刘歧
在 2020/7/25 下午2:11,“ffmpeg-devel 代表 Zlomek, Josef” 写入: Hi Steven, It is better but still not correct. Consider this test: test("http://server/foo/bar";, "a/b/../c/d/../e../.../..f/g../h../other/url/a.mp3/..."); It should give " http://server/foo/bar/a/c/e../..

Re: [FFmpeg-devel] [PATCH v2 1/2] avformat/url: check double dot is not to parent directory

2020-07-24 Thread Zlomek, Josef
Hi Steven, It is better but still not correct. Consider this test: test("http://server/foo/bar";, "a/b/../c/d/../e../.../..f/g../h../other/url/a.mp3/..."); It should give " http://server/foo/bar/a/c/e../.../..f/g../h../other/url/a.mp3/...";. I think the best would be to use strtok(p, "/") to spl

[FFmpeg-devel] [PATCH] avformat/riffenc: correct calculation for extradata size

2020-07-24 Thread Gyan Doshi
In 1ec2b3de5a, the extradata size was affected when the raster was signaled as flipped due to user-set option rather than via extradata. This resulted in a wrong header size being written. Fixed. --- libavformat/riffenc.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/

Re: [FFmpeg-devel] [PATCH] avformat/ape: Error out in case of EOF in the header

2020-07-24 Thread Andreas Rheinhardt
Michael Niedermayer: > Fixes: OOM > Fixes: > 24375/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6216862443241472 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer > --- > libavformat/ape.c | 8

Re: [FFmpeg-devel] [PATCH v2 2/2] avformat/hlsenc: write temp file for append single file by encryption mode

2020-07-24 Thread Steven Liu
Steven Liu 于2020年7月22日周三 下午5:16写道: > > fix ticket: 8783 > Because in single file by encryption mode, it cannot get the last one > block of the file, it need ff_format_io_close for get full file size, > then hlsenc can get the total size of the encryption content, > so write the content into temp f

[FFmpeg-devel] [PATCH v2 1/2] avformat/url: check double dot is not to parent directory

2020-07-24 Thread Steven Liu
fix ticket: 8814 if get ".." in the url, check next byte and lead byte by double dot, it there have no '/' and not root node, it is not used go to directory ".." Signed-off-by: Steven Liu --- libavformat/url.c | 12 1 file changed, 12 insertions(+) diff --git a/libavformat/url.c b/

[FFmpeg-devel] [PATCH v2 2/2] avformat/tests/url: add test cases of double dot is not goto directory

2020-07-24 Thread Steven Liu
Signed-off-by: Steven Liu --- libavformat/tests/url.c | 5 + tests/ref/fate/url | 5 + 2 files changed, 10 insertions(+) diff --git a/libavformat/tests/url.c b/libavformat/tests/url.c index 1d961a1b43..0201217109 100644 --- a/libavformat/tests/url.c +++ b/libavformat/tests/url.c @@

Re: [FFmpeg-devel] [PATCH v2 2/2] libavcodec/libaomenc.c: Add command-line options for inter-coding tools

2020-07-24 Thread James Zern
On Thu, Jul 23, 2020 at 3:48 PM James Zern wrote: > > On Wed, Jul 22, 2020 at 4:11 PM Wang Cao wrote: > > > > From: Wang Cao > > > > Signed-off-by: Wang Cao > > --- > > doc/encoders.texi | 36 + > > libavcodec/libaomenc.c | 60 ++

Re: [FFmpeg-devel] [PATCH v2 1/2] libavcodec/libaomenc.c: Add command-line options for tx tools.

2020-07-24 Thread James Zern
On Thu, Jul 23, 2020 at 3:48 PM James Zern wrote: > > On Wed, Jul 22, 2020 at 4:12 PM Wang Cao wrote: > > > > From: Wang Cao > > > > Signed-off-by: Wang Cao > > --- > > doc/encoders.texi | 20 > > libavcodec/libaomenc.c | 30 ++ > > libavco

[FFmpeg-devel] [PATCH] avformat/ape: Error out in case of EOF in the header

2020-07-24 Thread Michael Niedermayer
Fixes: OOM Fixes: 24375/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6216862443241472 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/ape.c | 8 +--- 1 file changed, 5 insertions(

Re: [FFmpeg-devel] [PATCH] Support HDR10+ metadata for HEVC.

2020-07-24 Thread Mohammad Izadi
On Fri, Jul 24, 2020 at 9:30 AM Andreas Rheinhardt < andreas.rheinha...@gmail.com> wrote: > Mohammad Izadi: > > From: Mohammad Izadi > > > > HDR10+ is dynamic metadata (A/341 Amendment - SMPTE2094-40) that needs > to be decoded from ITU-T T.35 in HEVC bitstream. The HDR10+ is transferred > to sid

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/alac: Check decorr_shift to avoid invalid shift

2020-07-24 Thread Michael Niedermayer
On Fri, Jul 24, 2020 at 08:31:04PM +0200, Alexander Strasser wrote: > Hi Michael! > > On 2020-07-24 00:11 +0200, Michael Niedermayer wrote: > > Fixes: shift exponent 128 is too large for 32-bit type 'int' > > Fixes: > > 23860/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALAC_fuzzer-575113891

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/v4l2_context: return EAGAIN to signal full buffers

2020-07-24 Thread Andriy Gelman
On Thu, 16. Jul 22:09, Andriy Gelman wrote: > From: Andriy Gelman > > Return proper error when a frame buffers are full. This path is > triggered on the DragonBoard 410c since the encoding API change in > commit 827d6fe73d2f5472c1c2. > > Signed-off-by: Andriy Gelman > --- > libavcodec/v4l2_con

Re: [FFmpeg-devel] [PATCH v4 1/2] libavcodec/jpeg2000dec: Fix codeblock decode check

2020-07-24 Thread Michael Niedermayer
On Thu, Jul 23, 2020 at 10:41:10PM +0530, gautamr...@gmail.com wrote: > From: Gautam Ramakrishnan > > The codeblock decoder checks whether the mqc decoder > has decoded the right number of bytes. However, this > check does not account for the fact that the mqc encoder's > flush routine adds 2 byt

Re: [FFmpeg-devel] [PATCH 1/2] lavc/aac_ac3_parser: fix the potential overflow

2020-07-24 Thread Alexander Strasser
On 2020-07-24 19:56 +0800, zhilizhao wrote: > > > > On Jul 24, 2020, at 9:40 AM, myp...@gmail.com wrote: > > > > On Fri, Jul 24, 2020 at 4:43 AM Alexander Strasser > > wrote: > >> > >> On 2020-07-01 21:05 +0200, Alexander Strasser wrote: > >>> On 2020-07-01 16:23 +0200, An

Re: [FFmpeg-devel] [PATCH v4 2/2] libavcodec/jpeg2000dec: Support for PPM marker

2020-07-24 Thread Michael Niedermayer
On Thu, Jul 23, 2020 at 10:41:11PM +0530, gautamr...@gmail.com wrote: > From: Gautam Ramakrishnan > > This patch adds support for PPM marker for JPEG2000 > decoder. It allows the samples p1_03.j2k and p1_05.j2k > to be decoded. > --- > libavcodec/jpeg2000dec.c | 107 +

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/alac: Check decorr_shift to avoid invalid shift

2020-07-24 Thread Alexander Strasser
Hi Michael! On 2020-07-24 00:11 +0200, Michael Niedermayer wrote: > Fixes: shift exponent 128 is too large for 32-bit type 'int' > Fixes: > 23860/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALAC_fuzzer-5751138914402304 > > Found-by: continuous fuzzing process > https://github.com/google/os

[FFmpeg-devel] [PATCH] avutil/imgutils: don't fill data pointers for missing planes

2020-07-24 Thread James Almer
The size for a previous plane doesn't signal the presence of another after it. If the plane is present, av_image_fill_plane_sizes() will have returned a size for it. Fixes a regression since 3a8e927176. Reported-by: Imad R. Faiad Signed-off-by: James Almer --- libavutil/imgutils.c | 2 +- 1 fi

Re: [FFmpeg-devel] [PATCH] Support HDR10+ metadata for HEVC.

2020-07-24 Thread Andreas Rheinhardt
Mohammad Izadi: > From: Mohammad Izadi > > HDR10+ is dynamic metadata (A/341 Amendment - SMPTE2094-40) that needs to be > decoded from ITU-T T.35 in HEVC bitstream. The HDR10+ is transferred to side > data packet to be used or passed through. > --- > libavcodec/avpacket.c | 1 + > libavcodec

Re: [FFmpeg-devel] [PATCH 1/2] avformat/url: check double dot is not directory

2020-07-24 Thread Andreas Rheinhardt
Steven Liu: > fix ticket: 8814 > if get double dot in the url, check next byte by double dot, > it there have no '/', it is not directory double dot > > Signed-off-by: Steven Liu > --- > libavformat/url.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/libavformat/url.c b/libavform

Re: [FFmpeg-devel] [PATCH 1/2] avformat/url: check double dot is not directory

2020-07-24 Thread Marton Balint
On Fri, 24 Jul 2020, Steven Liu wrote: fix ticket: 8814 if get double dot in the url, check next byte by double dot, it there have no '/', it is not directory double dot And what about previous byte? E.g.: http://ffmpeg.org/dummy../dummy Regards, Marton Signed-off-by: Steven Liu --- lib

Re: [FFmpeg-devel] [PATCH] Support HDR10+ metadata for HEVC

2020-07-24 Thread James Almer
On 7/23/2020 7:26 PM, Mohammad Izadi wrote: >>> void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t >> min_size) >>> { >>> @@ -2346,3 +2359,170 @@ int ff_int_from_list_or_default(void *ctx, const >> char * val_name, int val, >>> "%s %d are not supported. Set to default va

[FFmpeg-devel] [PATCH 2/2] libavformat/tests/url: add test case of double dot is not directory

2020-07-24 Thread Steven Liu
Signed-off-by: Steven Liu --- libavformat/tests/url.c | 2 ++ tests/ref/fate/url | 2 ++ 2 files changed, 4 insertions(+) diff --git a/libavformat/tests/url.c b/libavformat/tests/url.c index 1d961a1b43..3e4e5c4247 100644 --- a/libavformat/tests/url.c +++ b/libavformat/tests/url.c @@ -67,6 +

[FFmpeg-devel] [PATCH 1/2] avformat/url: check double dot is not directory

2020-07-24 Thread Steven Liu
fix ticket: 8814 if get double dot in the url, check next byte by double dot, it there have no '/', it is not directory double dot Signed-off-by: Steven Liu --- libavformat/url.c | 4 1 file changed, 4 insertions(+) diff --git a/libavformat/url.c b/libavformat/url.c index 20463a6674..92cb4

Re: [FFmpeg-devel] [PATCH 1/2] lavc/aac_ac3_parser: fix the potential overflow

2020-07-24 Thread zhilizhao
> On Jul 24, 2020, at 9:40 AM, myp...@gmail.com wrote: > > On Fri, Jul 24, 2020 at 4:43 AM Alexander Strasser > wrote: >> >> On 2020-07-01 21:05 +0200, Alexander Strasser wrote: >>> On 2020-07-01 16:23 +0200, Anton Khirnov wrote: Quoting Jun Zhao (2020-06-29 15:23

[FFmpeg-devel] [PATCH 4/4] avformat/smacker: Don't return packets for streams with AVDISCARD_ALL

2020-07-24 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/smacker.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libavformat/smacker.c b/libavformat/smacker.c index b7a68a63f3..9966a67055 100644 --- a/libavformat/smacker.c +++ b/libavformat/smacker.c @@ -308,8 +308,11 @

[FFmpeg-devel] [PATCH 3/4] avformat/smacker: Fix duration for PCM audio

2020-07-24 Thread Andreas Rheinhardt
For non-PCM audio, a Smacker frame contains the size of the decoded audio in the first four bytes of the audio packet data; for PCM data, said information would be redundant and according to [1] this field does not exist. Therefore this commit sets the duration and timestamps properly for PCM audio

[FFmpeg-devel] [PATCH 2/4] avformat/smacker: Set audio duration

2020-07-24 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/smacker.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/smacker.c b/libavformat/smacker.c index 5507e7c169..4ab150a6f0 100644 --- a/libavformat/smacker.c +++ b/libavformat/smacker.c @@ -315,7 +315,8 @@ static in

[FFmpeg-devel] [PATCH] hwcontext_vaapi: avoid fd leak in vaapi_device_derive

2020-07-24 Thread Haihao Xiang
--- libavutil/hwcontext_vaapi.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c index fb9be19647..a4dfaba92c 100644 --- a/libavutil/hwcontext_vaapi.c +++ b/libavutil/hwcontext_vaapi.c @@ -1698,8 +1698,12 @@ static i