[FFmpeg-devel] Calculating audio frame rate

2020-03-02 Thread Eran Kornblau
Hi all, First, I apologize for asking a question not directly related to ffmpeg development, but hope you can still help me... I'm looking for some code to calculate the frame rate of audio, based on parameters such as the codec id, sampling rate, channels, codec private data etc. For example,

[FFmpeg-devel] [PATCH 2/2] avformat/hls: Don't strdup non-null-terminated string

2020-03-02 Thread Andreas Rheinhardt
If an URI indicated that the data protocol was in use, it would be copied into a temporary buffer via strncpy(dst, src, strlen(src)), thereby ensuring that the trailing \0 would not be copied, despite dst being uninitialized. dst would then be av_strdup'ed, leading to potential segfaults. The

[FFmpeg-devel] [PATCH 1/2] avcodec/v4l2_m2m: Avoid using intermediate buffer

2020-03-02 Thread Andreas Rheinhardt
Up until now, v4l2_m2m would write via snprintf() into an intermediate buffer and then copy from there (via strncpy()) to the end buffer. This commit changes this by removing the intermediate buffer. The call to strncpy() was actually of the form strncpy(dst, src, strlen(src) + 1) which is unsafe

[FFmpeg-devel] libavformat/avisynth: AvxSynth deprecation and switch to AviSynth+

2020-03-02 Thread Stephen Hutchinson
With the release of version 3.5 earlier this evening, AviSynth+ can now be built and used natively on the same platforms AvxSynth could, making AvxSynth completely obsolete. Due to that, is there a preference for how we should handle this? I have two different patchsets ready to send. The

Re: [FFmpeg-devel] Splitting or merging libraries (was: Status and Plans for Subtitle Filters)

2020-03-02 Thread Vittorio Giovara
On Sun, Mar 1, 2020 at 6:54 AM Nicolas George wrote: > Vittorio Giovara (12020-02-28): > > err a monsterlibrary is a monsterlibrary regardless of how it is linked, > > and it's good that you mention static linking since that would be one of > > the best reason to keep library separated > > You

Re: [FFmpeg-devel] [PATCH 4/4] avformat/mxfenc: add some missing content package rates

2020-03-02 Thread Marton Balint
On Mon, 2 Mar 2020, Baptiste Coudurier wrote: Hey guys, On Mar 2, 2020, at 12:57 PM, Marton Balint wrote: On Mon, 2 Mar 2020, Tomas Härdin wrote: fre 2020-02-28 klockan 10:30 +0100 skrev Marton Balint: On Fri, 28 Feb 2020, Carl Eugen Hoyos wrote: > Am Fr., 28. Feb. 2020 um 01:38 Uhr

Re: [FFmpeg-devel] [PATCH 4/4] avformat/mxfenc: add some missing content package rates

2020-03-02 Thread Baptiste Coudurier
Hey guys, > On Mar 2, 2020, at 12:57 PM, Marton Balint wrote: > > > > On Mon, 2 Mar 2020, Tomas Härdin wrote: > >> fre 2020-02-28 klockan 10:30 +0100 skrev Marton Balint: >>> On Fri, 28 Feb 2020, Carl Eugen Hoyos wrote: >>> > Am Fr., 28. Feb. 2020 um 01:38 Uhr schrieb Marton Balint : >>> >

Re: [FFmpeg-devel] [PATCH 4/17] avformat/segment: Don't set extradata size twice

2020-03-02 Thread Michael Niedermayer
On Mon, Mar 02, 2020 at 10:47:29AM +0530, Gyan Doshi wrote: > > > On 02-03-2020 10:05 am, Andreas Rheinhardt wrote: > >ff_alloc_extradata() already sets the size of the extradata so doing it > >again is unnecessary. > > > >Signed-off-by: Andreas Rheinhardt > >--- > > libavformat/segment.c | 1

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/adpcm: Clip step index for ADPCM_IMA_APM

2020-03-02 Thread Michael Niedermayer
On Mon, Mar 02, 2020 at 09:40:52AM +0100, Paul B Mahol wrote: > lgtm will apply thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The misfortune of the wise is better than the prosperity of the fool. -- Epicurus signature.asc Description: PGP signature

Re: [FFmpeg-devel] [PATCH] avformat/mxfenc: Never set codec_ul UID to NULL

2020-03-02 Thread Baptiste Coudurier
Hi Andreas, > On Mar 2, 2020, at 10:14 AM, Tomas Härdin wrote: > > fre 2020-02-28 klockan 05:14 +0100 skrev Andreas Rheinhardt: >> mxf distinguishes codec profiles by different UIDs and therefore needs >> to check that the input is actually compatible with mxf (i.e. if there >> is a defined

Re: [FFmpeg-devel] [PATCH 1/1] Patch for adding Documentation of ff_http_match_no_proxy

2020-03-02 Thread Michael Niedermayer
On Mon, Mar 02, 2020 at 08:32:10PM +0530, Sourabh Sharma wrote: > Patch for adding Documentation of ff_http_match_no_proxy > Function ff_http_match_no_proxy check for host of proxy address matches with > the hostname or not. > > --- > libavformat/network.h | 7 +++ > 1 file changed, 7

Re: [FFmpeg-devel] [PATCH 7/30] avformat/matroskaenc: Avoid allocations for SeekHead

2020-03-02 Thread Andreas Rheinhardt
On Fri, Feb 28, 2020 at 6:10 AM Andreas Rheinhardt < andreas.rheinha...@gmail.com> wrote: > On Tue, Feb 25, 2020 at 2:24 PM Andreas Rheinhardt < > andreas.rheinha...@gmail.com> wrote: > >> Andreas Rheinhardt: >> > Andreas Rheinhardt: >> >> Andreas Rheinhardt: >> >>> Up until e7ddafd5, the

Re: [FFmpeg-devel] [PATCH] avformat/udp: support w32pthreads compat

2020-03-02 Thread Ross Nicholson
phunkyfish in the history is fine thanks ;) > On 2 Mar 2020, at 21:00, Marton Balint wrote: > >  > >> On Mon, 2 Mar 2020, Ross Nicholson wrote: >> >> Updated to correct header. > > Can you resend the patch with the proper author (e.g. Ross Nicholson instead > of phunkyfish?) Or you want to

Re: [FFmpeg-devel] [PATCH v2] avformat/mxfenc: use a zero based continuity counter

2020-03-02 Thread Marton Balint
On Mon, 2 Mar 2020, Tomas Härdin wrote: lör 2020-02-29 klockan 21:06 +0100 skrev Marton Balint: The standard does not seem to require the counter to be zero based, but some checker tools (MyriadBits MXFInspect, Interra Baton) have validations against 0 start... Fixes ticket #6781.

Re: [FFmpeg-devel] [PATCH] avformat/udp: support w32pthreads compat

2020-03-02 Thread Marton Balint
On Mon, 2 Mar 2020, Ross Nicholson wrote: Updated to correct header. Can you resend the patch with the proper author (e.g. Ross Nicholson instead of phunkyfish?) Or you want to appear as phunkyfish in the history? Thanks, Marton On Mon, 2 Mar 2020 at 19:53, Marton Balint wrote:

Re: [FFmpeg-devel] [PATCH 4/4] avformat/mxfenc: add some missing content package rates

2020-03-02 Thread Marton Balint
On Mon, 2 Mar 2020, Tomas Härdin wrote: fre 2020-02-28 klockan 10:30 +0100 skrev Marton Balint: On Fri, 28 Feb 2020, Carl Eugen Hoyos wrote: > Am Fr., 28. Feb. 2020 um 01:38 Uhr schrieb Marton Balint : > > Fixes ticket #8523. > > > > Signed-off-by: Marton Balint > > --- > >

Re: [FFmpeg-devel] [PATCH] avformat/udp: support w32pthreads compat

2020-03-02 Thread Ross Nicholson
Updated to correct header. On Mon, 2 Mar 2020 at 19:53, Marton Balint wrote: > > > On Mon, 2 Mar 2020, phunkyfish wrote: > > > --- > > compat/w32pthreads.h | 8 > > libavformat/udp.c| 6 +- > > 2 files changed, 13 insertions(+), 1 deletion(-) > > > > diff --git

[FFmpeg-devel] [PATCH] avformat/udp: support w32pthreads compat

2020-03-02 Thread phunkyfish
--- compat/w32pthreads.h | 8 libavformat/udp.c| 7 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/compat/w32pthreads.h b/compat/w32pthreads.h index 7df33b7da4..6405e72b64 100644 --- a/compat/w32pthreads.h +++ b/compat/w32pthreads.h @@ -63,6 +63,9 @@ typedef

Re: [FFmpeg-devel] [PATCH 2/4] avformat/mxf: get rid of samples per frame array usage

2020-03-02 Thread Marton Balint
On Mon, 2 Mar 2020, Tomas Härdin wrote: fre 2020-02-28 klockan 01:37 +0100 skrev Marton Balint: Signed-off-by: Marton Balint --- libavformat/mxf.c| 44 libavformat/mxf.h| 6 -- libavformat/mxfdec.c | 23 +++

Re: [FFmpeg-devel] [PATCH V2] [RFC] GSoC: FLIF16 Image format parser

2020-03-02 Thread Nicolas George
Anamitra Ghorui (12020-03-02): > According to the specification of the file format, there is no mention of an > upper bound for the integer: https://flif.info/spec.html#_part_1_main_header But they are mapped to FFmpeg values: width and height are ints, frame counts are uint64_t at best.

Re: [FFmpeg-devel] [PATCH] avformat/udp: support w32pthreads compat

2020-03-02 Thread Marton Balint
On Mon, 2 Mar 2020, phunkyfish wrote: --- compat/w32pthreads.h | 8 libavformat/udp.c| 6 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/compat/w32pthreads.h b/compat/w32pthreads.h index 7df33b7da4..6405e72b64 100644 --- a/compat/w32pthreads.h +++

[FFmpeg-devel] [PATCH] avformat/rtp: Pass sources and block filter addresses via sdp file for rtp

2020-03-02 Thread phunkyfish
--- libavformat/rtsp.c | 49 ++ 1 file changed, 41 insertions(+), 8 deletions(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index cd6fc32a29..d23ec5723e 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -2447,8 +2447,8 @@ static int

[FFmpeg-devel] [PATCH] avformat/rtp: Pass sources and block filter addresses via sdp file for rtp

2020-03-02 Thread phunkyfish
--- libavformat/rtsp.c | 49 ++ 1 file changed, 41 insertions(+), 8 deletions(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index cd6fc32a29..c744e403c6 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -2447,8 +2447,8 @@ static int

Re: [FFmpeg-devel] [PATCH] avformat/mxfenc: Never set codec_ul UID to NULL

2020-03-02 Thread Tomas Härdin
fre 2020-02-28 klockan 05:14 +0100 skrev Andreas Rheinhardt: > mxf distinguishes codec profiles by different UIDs and therefore needs > to check that the input is actually compatible with mxf (i.e. if there > is a defined UID for it). If not, then sometimes the UID would be set to > NULL and

Re: [FFmpeg-devel] [PATCH v2] avformat/mxfenc: use a zero based continuity counter

2020-03-02 Thread Tomas Härdin
lör 2020-02-29 klockan 21:06 +0100 skrev Marton Balint: > The standard does not seem to require the counter to be zero based, but some > checker tools (MyriadBits MXFInspect, Interra Baton) have validations against > 0 > start... > > Fixes ticket #6781. > > Signed-off-by: Marton Balint > --- >

Re: [FFmpeg-devel] [PATCH 3/4] avformat/mxfenc: move content package rates and timebase combinations to a separate struct

2020-03-02 Thread Tomas Härdin
fre 2020-02-28 klockan 01:37 +0100 skrev Marton Balint: > Signed-off-by: Marton Balint > --- > libavformat/mxf.c | 28 > libavformat/mxf.h | 5 + > 2 files changed, 17 insertions(+), 16 deletions(-) > Reasonable enough. /Tomas

Re: [FFmpeg-devel] [PATCH 2/4] avformat/mxf: get rid of samples per frame array usage

2020-03-02 Thread Tomas Härdin
fre 2020-02-28 klockan 01:37 +0100 skrev Marton Balint: > Signed-off-by: Marton Balint > --- > libavformat/mxf.c| 44 > libavformat/mxf.h| 6 -- > libavformat/mxfdec.c | 23 +++ > libavformat/mxfenc.c | 24

Re: [FFmpeg-devel] [PATCH 4/4] avformat/mxfenc: add some missing content package rates

2020-03-02 Thread Tomas Härdin
fre 2020-02-28 klockan 10:30 +0100 skrev Marton Balint: > > On Fri, 28 Feb 2020, Carl Eugen Hoyos wrote: > > > Am Fr., 28. Feb. 2020 um 01:38 Uhr schrieb Marton Balint : > > > Fixes ticket #8523. > > > > > > Signed-off-by: Marton Balint > > > --- > > > libavformat/mxf.c | 13 + > >

Re: [FFmpeg-devel] [PATCH 1/4] avformat/audiointerleave: disallow using a samples_per_frame array

2020-03-02 Thread Andreas Rheinhardt
On Fri, Feb 28, 2020 at 1:38 AM Marton Balint wrote: > Only MXF used an actual sample array, and that is unneeded there because > simple > rounding rules can be used instead. > > Signed-off-by: Marton Balint > --- > libavformat/audiointerleave.c | 24 ++-- >

Re: [FFmpeg-devel] [PATCH 1/4] avformat/audiointerleave: disallow using a samples_per_frame array

2020-03-02 Thread Tomas Härdin
Sorry for replying a bit late, I've been sick fre 2020-02-28 klockan 01:37 +0100 skrev Marton Balint: > Only MXF used an actual sample array, and that is unneeded there > because simple > rounding rules can be used instead. Does this produce the exact same rounding? Like 1602, 1601, 1602, 1601,

Re: [FFmpeg-devel] [PATCH v2 1/2] avformat: Add AMQP version 0-9-1 protocol support

2020-03-02 Thread Andriy Gelman
On Mon, 02. Mar 11:41, Anton Khirnov wrote: > Quoting Marton Balint (2020-02-29 17:09:58) > > > > > > On Sat, 29 Feb 2020, Paul B Mahol wrote: > > > > > I think this was already rejected? > > > > jb questioned if this belongs to libavformat, and timo asked how well the > > message brokers

Re: [FFmpeg-devel] [PATCH] avcodec/cuviddec: use AVCodec.bsfs to filter packets

2020-03-02 Thread James Almer
On 3/2/2020 7:35 AM, Anton Khirnov wrote: > Quoting James Almer (2020-03-01 04:00:25) > [...] >> +if (avctx->codec->bsfs) { >> +const AVBSFContext *bsf = >> avctx->internal->filter.bsfs[avctx->internal->filter.nb_bsfs - 1]; > > yuck > > I guess it's acceptable for now, but we'll

Re: [FFmpeg-devel] [PATCH 1/1] Patch for adding Documentation of ff_http_match_no_proxy

2020-03-02 Thread Sourabh Sharma
Patch for adding Documentation of ff_http_match_no_proxy Function ff_http_match_no_proxy check for host of proxy address matches with the hostname or not. --- libavformat/network.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libavformat/network.h b/libavformat/network.h index

[FFmpeg-devel] [PATCH] avformat/udp: support w32pthreads compat

2020-03-02 Thread phunkyfish
--- compat/w32pthreads.h | 8 libavformat/udp.c| 6 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/compat/w32pthreads.h b/compat/w32pthreads.h index 7df33b7da4..6405e72b64 100644 --- a/compat/w32pthreads.h +++ b/compat/w32pthreads.h @@ -63,6 +63,9 @@ typedef

Re: [FFmpeg-devel] [PATCH] avformat/udp: support w32pthreads compat

2020-03-02 Thread Ross Nicholson
Thanks! On Mon, 2 Mar 2020 at 14:16, Andriy Gelman wrote: > On Mon, 02. Mar 13:38, phunkyfish wrote: > > --- > > compat/w32pthreads.h | 10 ++ > > libavformat/udp.c| 8 +++- > > 2 files changed, 17 insertions(+), 1 deletion(-) > > > > diff --git a/compat/w32pthreads.h

Re: [FFmpeg-devel] [PATCH] avformat/udp: support w32pthreads compat

2020-03-02 Thread Andriy Gelman
On Mon, 02. Mar 13:38, phunkyfish wrote: > --- > compat/w32pthreads.h | 10 ++ > libavformat/udp.c| 8 +++- > 2 files changed, 17 insertions(+), 1 deletion(-) > > diff --git a/compat/w32pthreads.h b/compat/w32pthreads.h > index 7df33b7da4..64cd40cda4 100644 > ---

[FFmpeg-devel] [PATCH] avformat/udp: support w32pthreads compat

2020-03-02 Thread phunkyfish
--- compat/w32pthreads.h | 10 ++ libavformat/udp.c| 8 +++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/compat/w32pthreads.h b/compat/w32pthreads.h index 7df33b7da4..64cd40cda4 100644 --- a/compat/w32pthreads.h +++ b/compat/w32pthreads.h @@ -63,6 +63,11 @@

Re: [FFmpeg-devel] [PATCH] avformat/udp: support w32pthreads compat

2020-03-02 Thread Ross Nicholson
This should allow the use of w32pthreads compat layer to be used for UDP. For windows this would mean not needing to change the underlying threading impl. On Mon, 2 Mar 2020 at 12:53, phunkyfish wrote: > --- > compat/w32pthreads.h | 8 > libavformat/udp.c| 8 +++- > 2 files

[FFmpeg-devel] [PATCH] avformat/udp: support w32pthreads compat

2020-03-02 Thread phunkyfish
--- compat/w32pthreads.h | 8 libavformat/udp.c| 8 +++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/compat/w32pthreads.h b/compat/w32pthreads.h index 7df33b7da4..6405e72b64 100644 --- a/compat/w32pthreads.h +++ b/compat/w32pthreads.h @@ -63,6 +63,9 @@ typedef

Re: [FFmpeg-devel] [PATCH V2] [RFC] GSoC: FLIF16 Image format parser

2020-03-02 Thread Anamitra Ghorui
Hello, > Is there an upper bound for the size of these integers? In my > experience, varints in multimedia code are used to save a few bits in > the file than to allow very large integers. You could make the code much > simpler if you had an upper bound. > > Also, there is probably already

Re: [FFmpeg-devel] [PATCH V1 1/3] lavf/dashenc: add 3GPP TS26.247 probe in dash demuxer

2020-03-02 Thread myp...@gmail.com
On Mon, Mar 2, 2020 at 5:10 PM Carl Eugen Hoyos wrote: > > Am So., 1. März 2020 um 13:39 Uhr schrieb Jun Zhao : > > > > From: Jun Zhao > > > > Enabled the 3GP-DASH Release-10/Relase-11(3GPP TS26.247) profile > > to dash demuxer probe. > > > > Signed-off-by: Jun Zhao > > --- > >

Re: [FFmpeg-devel] [PATCH v2 1/2] avformat: Add AMQP version 0-9-1 protocol support

2020-03-02 Thread Carl Eugen Hoyos
Am Mo., 2. März 2020 um 11:41 Uhr schrieb Anton Khirnov : > > Quoting Marton Balint (2020-02-29 17:09:58) > > > > > > On Sat, 29 Feb 2020, Paul B Mahol wrote: > > > > > I think this was already rejected? > > > > jb questioned if this belongs to libavformat, and timo asked how well the > > message

Re: [FFmpeg-devel] [PATCH v2 1/2] avformat: Add AMQP version 0-9-1 protocol support

2020-03-02 Thread Anton Khirnov
Quoting Marton Balint (2020-02-29 17:09:58) > > > On Sat, 29 Feb 2020, Paul B Mahol wrote: > > > I think this was already rejected? > > jb questioned if this belongs to libavformat, and timo asked how well the > message brokers handle high bitrates/big message sizes, no hard rejects > were

Re: [FFmpeg-devel] [PATCH] avcodec/cuviddec: use AVCodec.bsfs to filter packets

2020-03-02 Thread Anton Khirnov
Quoting James Almer (2020-03-01 04:00:25) [...] > +if (avctx->codec->bsfs) { > +const AVBSFContext *bsf = > avctx->internal->filter.bsfs[avctx->internal->filter.nb_bsfs - 1]; yuck I guess it's acceptable for now, but we'll want to get rid of that in the future. Might be tricky

Re: [FFmpeg-devel] [PATCH V2] [RFC] GSoC: FLIF16 Image format parser

2020-03-02 Thread Anton Khirnov
Quoting Nicolas George (2020-03-01 19:59:11) > > > +} varint_t; > > Names ending in _t are reserved by the C standard. FFmpeg uses types > with capitals and FF prefix for private APIs. FF prefix is not needed for structs. -- Anton Khirnov ___

Re: [FFmpeg-devel] [PATCH 3/17] avformat/avformat: Allow const AVOutputFormat where possible

2020-03-02 Thread Carl Eugen Hoyos
Am Mo., 2. März 2020 um 05:36 Uhr schrieb Andreas Rheinhardt : > -int avformat_alloc_output_context2(AVFormatContext **ctx, ff_const59 > AVOutputFormat *oformat, > +int avformat_alloc_output_context2(AVFormatContext **ctx, const > AVOutputFormat *oformat, >

Re: [FFmpeg-devel] [PATCH V1 1/3] lavf/dashenc: add 3GPP TS26.247 probe in dash demuxer

2020-03-02 Thread Carl Eugen Hoyos
Am So., 1. März 2020 um 13:39 Uhr schrieb Jun Zhao : > > From: Jun Zhao > > Enabled the 3GP-DASH Release-10/Relase-11(3GPP TS26.247) profile > to dash demuxer probe. > > Signed-off-by: Jun Zhao > --- > libavformat/dashdec.c |4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > >

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/adpcm: Clip step index for ADPCM_IMA_APM

2020-03-02 Thread Paul B Mahol
lgtm On 3/1/20, Michael Niedermayer wrote: > Fixes: out of array access > Fixes: > 20828/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ADPCM_IMA_APM_fuzzer-5712770106654720 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg >