Re: [FFmpeg-devel] [PATCH] Update HDR10+ metadata structure.

2020-02-20 Thread Vittorio Giovara
On Thu, Feb 20, 2020 at 6:38 PM James Almer wrote: > On 2/20/2020 5:02 PM, Vittorio Giovara wrote: > > On Mon, Feb 10, 2020 at 3:14 PM Mohammad Izadi > wrote: > > > >> From: Mohammad Izadi > >> > >> Trying to read HDR10+ metadata from HEVC/SEI and pass it to packet side > >> data in the

Re: [FFmpeg-devel] [PATCH] Update HDR10+ metadata structure.

2020-02-20 Thread James Almer
On 2/20/2020 5:02 PM, Vittorio Giovara wrote: > On Mon, Feb 10, 2020 at 3:14 PM Mohammad Izadi wrote: > >> From: Mohammad Izadi >> >> Trying to read HDR10+ metadata from HEVC/SEI and pass it to packet side >> data in the follow-up CLs. >> --- >> libavutil/hdr_dynamic_metadata.c | 165

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/cdtoons: Correct several end of data checks in cdtoons_render_sprite()

2020-02-20 Thread Paul B Mahol
LGTM On 2/20/20, Michael Niedermayer wrote: > No testcases, found by code review when debuging issue found by oss-fuzz > > Signed-off-by: Michael Niedermayer > --- > libavcodec/cdtoons.c | 24 ++-- > 1 file changed, 14 insertions(+), 10 deletions(-) > > diff --git

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/cdtoons: Fix off by 4 check on diff_size

2020-02-20 Thread Paul B Mahol
On 2/20/20, Michael Niedermayer wrote: > On Thu, Feb 20, 2020 at 08:11:34PM +0100, Paul B Mahol wrote: >> Are you sure this is correct? >> Does asan reports exactly overread by 4? > > the next line passes diff_size - 8 as a unsigned data size > if diff_size is smaller than 8, diff_size - 8 is

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/cdtoons: Fix off by 4 check on diff_size

2020-02-20 Thread Michael Niedermayer
On Thu, Feb 20, 2020 at 08:11:34PM +0100, Paul B Mahol wrote: > Are you sure this is correct? > Does asan reports exactly overread by 4? the next line passes diff_size - 8 as a unsigned data size if diff_size is smaller than 8, diff_size - 8 is very big and the overread checks which use that will

[FFmpeg-devel] [PATCH] avformat/ac3dec: detect fairplay encryption

2020-02-20 Thread Sebastian Hubbard
Added id3v2_buf and id3v2_buf_size fields to AVProbeData. When an id3v2 tag is found at the start of probed content, id3v2_buf is filled with a pointer to the start of the tag bytes, and id3v2_buf_size with the number of bytes in the tag. ac3_eac3_probe checks the tag when present for a private

Re: [FFmpeg-devel] [PATCH] Update HDR10+ metadata structure.

2020-02-20 Thread Vittorio Giovara
On Thu, Feb 20, 2020 at 3:16 PM Mohammad Izadi wrote: > On Thu, Feb 20, 2020 at 12:10 PM Vittorio Giovara < > vittorio.giov...@gmail.com> wrote: > > > On Mon, Feb 10, 2020 at 3:14 PM Mohammad Izadi > > wrote: > > > > > From: Mohammad Izadi > > > > > > Trying to read HDR10+ metadata from

[FFmpeg-devel] [PATCH] avformat/mux: allow non-monotonic ts with AVFMT_NOTIMESTAMPS

2020-02-20 Thread Anssi Hannula
Allow non-monotonic input timestamps for muxers with no timestamps at all (AVFMT_NOTIMESTAMPS). This is frequently hit when muxing TrueHD with spdifenc as many MKV files use 1ms timestamps while TrueHD frames are shorter than that (1/1200 sec for 48kHz-based and 1/1102.5 sec for 44.1kHz-based

Re: [FFmpeg-devel] [PATCH] Update HDR10+ metadata structure.

2020-02-20 Thread Mohammad Izadi
On Thu, Feb 20, 2020 at 12:10 PM Vittorio Giovara < vittorio.giov...@gmail.com> wrote: > On Mon, Feb 10, 2020 at 3:14 PM Mohammad Izadi > wrote: > > > From: Mohammad Izadi > > > > Trying to read HDR10+ metadata from HEVC/SEI and pass it to packet side > > data in the follow-up CLs. > > --- > >

Re: [FFmpeg-devel] [PATCH] Update HDR10+ metadata structure.

2020-02-20 Thread Vittorio Giovara
On Mon, Feb 10, 2020 at 3:14 PM Mohammad Izadi wrote: > From: Mohammad Izadi > > Trying to read HDR10+ metadata from HEVC/SEI and pass it to packet side > data in the follow-up CLs. > --- > libavutil/hdr_dynamic_metadata.c | 165 +++ >

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/cdtoons: Fix off by 4 check on diff_size

2020-02-20 Thread Paul B Mahol
Are you sure this is correct? Does asan reports exactly overread by 4? On 2/20/20, Michael Niedermayer wrote: > Fixes: out of array read > Fixes: > 20742/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CDTOONS_fuzzer-5738148607033344 > > Found-by: continuous fuzzing process >

Re: [FFmpeg-devel] [PATCH v1 1/2] avformat/rtsp: apply rtcp attribute from sdp file

2020-02-20 Thread Jun Li
Ping x 2 On Sun, Feb 9, 2020 at 3:01 PM Jun Li wrote: > > > On Mon, Feb 3, 2020 at 4:34 PM Jun Li wrote: > >> Fix #8479 >> Apply rtcpport from sdp file if it contains rtcp attribute. >> >> Signed-off-by: Jun Li >> --- >> libavformat/rtsp.c | 12 ++-- >> libavformat/rtsp.h | 1 + >>

Re: [FFmpeg-devel] [PATCH v1 2/2] avformat/rtpproto, sdp: write rtcp port to sdp file

2020-02-20 Thread Jun Li
On Sun, Feb 9, 2020 at 3:01 PM Jun Li wrote: > > > On Mon, Feb 3, 2020 at 4:34 PM Jun Li wrote: > >> Fix #8474 >> Write rtcp port attribute to sdp file when necessary. >> >> Signed-off-by: Jun Li >> --- >> libavformat/rtpproto.c | 11 +++ >> libavformat/rtpproto.h | 2 ++ >>

[FFmpeg-devel] [PATCH 2/2] avcodec/cdtoons: Fix off by 4 check on diff_size

2020-02-20 Thread Michael Niedermayer
Fixes: out of array read Fixes: 20742/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CDTOONS_fuzzer-5738148607033344 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/cdtoons.c | 2 +- 1

[FFmpeg-devel] [PATCH 1/2] avcodec/cdtoons: Correct several end of data checks in cdtoons_render_sprite()

2020-02-20 Thread Michael Niedermayer
No testcases, found by code review when debuging issue found by oss-fuzz Signed-off-by: Michael Niedermayer --- libavcodec/cdtoons.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/libavcodec/cdtoons.c b/libavcodec/cdtoons.c index

[FFmpeg-devel] [PATCH 3/3 v2] avformat/dashenc: always attempt to enable prft on ldash mode

2020-02-20 Thread James Almer
Signed-off-by: James Almer --- Now it can be overriden if you explicitly set write_prft to 0. libavformat/dashenc.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index a52cbc9113..7032adc84d 100644 ---

Re: [FFmpeg-devel] New Defects reported by Coverity Scan for FFmpeg/FFmpeg (fwd)

2020-02-20 Thread Andreas Rheinhardt
Marton Balint: > Hi, > > Has anybody reported these and similar false positives involving > av_dict_set() with a 0 flag to Coverity? > > These are popping up all over the codebase, something should be done > to make Coverity smarter about them. Any ideas? > I wrote an email to them* ten days

Re: [FFmpeg-devel] [PATCH v3 1/2] avcodec: add decoder for Rayman 2's ADPCM variant

2020-02-20 Thread Zane van Iperen
20/2/20 11:49 pm, Paul B Mahol пишет: > > On 2/20/20, Zane van Iperen wrote: >> Adds support for the ADPCM variant used in Rayman 2's files. >> >> +case AV_CODEC_ID_ADPCM_IMA_APM: >> +for (n = nb_samples / 2; n > 0; n--) { >> +for (channel = 0; channel < avctx->channels;

Re: [FFmpeg-devel] [PATCH 2/3 v2] avcodec: add an AVCodecContext flag to export PRFT side data on demand

2020-02-20 Thread Derek Buitenhuis
On 20/02/2020 14:35, Anton Khirnov wrote: > IIUC the change is merely that PRFT is exported on demand rather than > always. Uh I got this patch set mixed up with the 2-3 other patch sets involving side data types. Please disregard. - Derek

Re: [FFmpeg-devel] [PATCH 2/3 v2] avcodec: add an AVCodecContext flag to export PRFT side data on demand

2020-02-20 Thread Anton Khirnov
Quoting Derek Buitenhuis (2020-02-20 15:30:41) > On 20/02/2020 08:49, Anton Khirnov wrote: > > Well, technically yes. Master is supposed to be stable. But I suppose > > we can be less strict for exact behavior of specific encoders, that has > > never been particularly strongly specified. > >

Re: [FFmpeg-devel] [PATCH 2/3 v2] avcodec: add an AVCodecContext flag to export PRFT side data on demand

2020-02-20 Thread Derek Buitenhuis
On 20/02/2020 08:49, Anton Khirnov wrote: > Well, technically yes. Master is supposed to be stable. But I suppose > we can be less strict for exact behavior of specific encoders, that has > never been particularly strongly specified. Changing what a type of side data means is not encoder

Re: [FFmpeg-devel] [PATCH v3 1/2] avcodec: add decoder for Rayman 2's ADPCM variant

2020-02-20 Thread Paul B Mahol
On 2/20/20, Zane van Iperen wrote: > Adds support for the ADPCM variant used in Rayman 2's files. > > Signed-off-by: Zane van Iperen > --- > libavcodec/Makefile | 1 + > libavcodec/adpcm.c | 21 + > libavcodec/allcodecs.c | 1 + > libavcodec/avcodec.h| 1 + >

Re: [FFmpeg-devel] [PATCH 1/4] avcodec/startcode: Use AV_RN due to UBSan warning about unaligned access

2020-02-20 Thread Andreas Rheinhardt
Andreas Rheinhardt: > when directly accessing a buffer via a pointer to uint8_t cast to a > pointer to uint64_t/uint32_t. This happened only if HAVE_FAST_UNALIGNED > was set, so it was ok, but UBSan nevertheless complained about unaligned > accesses. So simply use AV_RNxx to read the buffer; this

Re: [FFmpeg-devel] [PATCH 2/2] lavd/opengl_enc: check strings before parsing them.

2020-02-20 Thread Nicolas George
Mark Thompson (12020-02-19): > I'd make the error more direct, since this is to be seen by a > developer messing up - it's that there is no OpenGL context current on > the calling thread. Thanks. I changed the message according to that and pushed both patches. Regards, -- Nicolas George

Re: [FFmpeg-devel] [PATCH 3/3] avformat/dashenc: always attempt to enable prft on ldash mode

2020-02-20 Thread James Almer
On 2/20/2020 7:38 AM, Thilo Borgmann wrote: > Am 20.02.20 um 04:24 schrieb James Almer: >> On 2/19/2020 11:24 PM, Jeyapal, Karthick wrote: >>> >>> On 2/20/20 7:19 AM, James Almer wrote: On 2/19/2020 9:33 PM, Jeyapal, Karthick wrote: > > On 2/19/20 7:05 PM, James Almer wrote: >> On

Re: [FFmpeg-devel] [PATCH v7 3/3] avcodec/mpeg12dec: Add CPB coded side data

2020-02-20 Thread Gaullier Nicolas
> De : ffmpeg-devel De la part de James Almer > Envoyé : vendredi 7 février 2020 23:48 > À : ffmpeg-devel@ffmpeg.org > Objet : Re: [FFmpeg-devel] [PATCH v7 3/3] avcodec/mpeg12dec: Add CPB coded > side data > > On 2/7/2020 7:43 PM, James Almer wrote: > > On 1/14/2020 8:42 PM, Nicolas Gaullier

[FFmpeg-devel] [PATCH v3 0/2] Ubisoft Rayman 2 APM demuxer + decoder.

2020-02-20 Thread Zane van Iperen
Hi all, This patchset adds support for the APM files used by Rayman 2. It has been tested against all *.apm files in the game folder. v3: - simplify the decoder v2: - Change extradata to use AV_{W,R}L32 instead of AV_{W,R}N32 - fix version - add probe function - removed an

[FFmpeg-devel] [PATCH v3 2/2] avformat: add demuxer for Rayman 2's APM format

2020-02-20 Thread Zane van Iperen
Adds support for the APM file format used by Ubisoft's Rayman 2. Signed-off-by: Zane van Iperen --- libavformat/Makefile | 1 + libavformat/allformats.c | 1 + libavformat/apm.c| 188 +++ libavformat/version.h| 4 +- 4 files changed, 192

[FFmpeg-devel] [PATCH v3 1/2] avcodec: add decoder for Rayman 2's ADPCM variant

2020-02-20 Thread Zane van Iperen
Adds support for the ADPCM variant used in Rayman 2's files. Signed-off-by: Zane van Iperen --- libavcodec/Makefile | 1 + libavcodec/adpcm.c | 21 + libavcodec/allcodecs.c | 1 + libavcodec/avcodec.h| 1 + libavcodec/codec_desc.c | 7 +++

Re: [FFmpeg-devel] [PATCH v7 3/3] avcodec/mpeg12dec: Add CPB coded side data

2020-02-20 Thread Gaullier Nicolas
> De : ffmpeg-devel De la part de Michael > Niedermayer > Envoyé : vendredi 7 février 2020 23:39 > À : FFmpeg development discussions and patches > Objet : Re: [FFmpeg-devel] [PATCH v7 3/3] avcodec/mpeg12dec: Add CPB coded > side data > > On Wed, Jan 15, 2020 at 12:42:13AM +0100, Nicolas

Re: [FFmpeg-devel] [PATCH 3/3] avformat/dashenc: always attempt to enable prft on ldash mode

2020-02-20 Thread Thilo Borgmann
Am 20.02.20 um 04:24 schrieb James Almer: > On 2/19/2020 11:24 PM, Jeyapal, Karthick wrote: >> >> On 2/20/20 7:19 AM, James Almer wrote: >>> On 2/19/2020 9:33 PM, Jeyapal, Karthick wrote: On 2/19/20 7:05 PM, James Almer wrote: > On 2/19/2020 8:50 AM, Jeyapal, Karthick wrote: >>

Re: [FFmpeg-devel] [PATCH 2/3 v2] avcodec: add an AVCodecContext flag to export PRFT side data on demand

2020-02-20 Thread Anton Khirnov
Quoting James Almer (2020-02-19 17:42:24) > On 2/19/2020 12:21 PM, Derek Buitenhuis wrote: > > On 10/02/2020 18:26, James Almer wrote: > >> /** > >> - * Producer Reference Time data corresponding to the > >> AVProducerReferenceTime struct. > >> + * Producer Reference Time data

Re: [FFmpeg-devel] [PATCH, v2 2/4] avc/avcodec: add AV_CODEC_CAP_VARIABLE_DIMENSIONS flag

2020-02-20 Thread Anton Khirnov
Quoting Fu, Linjie (2020-02-19 17:25:30) > > Yes, that's what I mean. Flush and destroy an AVCodecContext and open a > > new one. But then why is there a need for this flag? > > > Previously I intended to add close and re-init inside specific encoder like > [1], > without destroy AVCodecContext,

Re: [FFmpeg-devel] [PATCH, v2 2/4] avc/avcodec: add AV_CODEC_CAP_VARIABLE_DIMENSIONS flag

2020-02-20 Thread Anton Khirnov
Quoting Michael Niedermayer (2020-02-19 19:07:28) > On Tue, Feb 18, 2020 at 05:42:19PM +0100, Anton Khirnov wrote: > > Quoting Fu, Linjie (2020-02-18 16:06:10) > > > > Is there even a sufficiently strong use case for this? Why not just > > > > > > Like transcoding