Re: [FFmpeg-devel] [RFC]separation of multiple outputs' encoding

2020-05-17 Thread Tao Zhang
If no more comments, I will try to code something to create a pseudo encoder which run the actual encoding in the separate thread. Thanks Tao Zhang 于2020年5月15日周五 上午10:14写道: > > Marton Balint 于2020年5月15日周五 上午2:33写道: > > > > > > > > On Thu, 14 May 2020, Tao Zhang wrote: > > > > > Hi, > > > FFmpeg

Re: [FFmpeg-devel] [PATCH, v2 1/2] lavc/qsvdec: add decode support for HEVC 4:2:2 8-bit and 10-bit

2020-05-17 Thread Fu, Linjie
> From: ffmpeg-devel On Behalf Of > Max Dmitrichenko > Sent: Friday, May 15, 2020 16:19 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Cc: Zhong Li > Subject: Re: [FFmpeg-devel] [PATCH, v2 1/2] lavc/qsvdec: add decode > support for HEVC 4:2:2 8-bit and 10-bit > > On Fri, M

Re: [FFmpeg-devel] [PATCH] avformat/url: check the result of the strrchr

2020-05-17 Thread Steven Liu
> 2020年5月17日 上午10:35,Steven Liu 写道: > > > >> 2020年5月15日 下午6:26,Steven Liu 写道: >> >> >> >>> 2020年5月15日 下午6:01,Steven Liu 写道: >>> >>> because it need be check for success, is should not >>> change the old way if it failure. >> Change the comments: >> because it need be checked for succes

Re: [FFmpeg-devel] [PATCH 6/6] avcodec: move mpeg4 profiles to profiles.h

2020-05-17 Thread Fu, Linjie
> From: ffmpeg-devel On Behalf Of > Marton Balint > Sent: Tuesday, May 12, 2020 03:35 > To: ffmpeg-devel@ffmpeg.org > Cc: Marton Balint > Subject: [FFmpeg-devel] [PATCH 6/6] avcodec: move mpeg4 profiles to > profiles.h > > Signed-off-by: Marton Balint > --- > doc/codecs.texi| 17 ++

Re: [FFmpeg-devel] [PATCH 1/6] avutil/opt: add AV_OPT_FLAG_CHILD_CONSTS

2020-05-17 Thread Fu, Linjie
> From: ffmpeg-devel On Behalf Of > Marton Balint > Sent: Tuesday, May 12, 2020 03:35 > To: ffmpeg-devel@ffmpeg.org > Cc: Marton Balint > Subject: [FFmpeg-devel] [PATCH 1/6] avutil/opt: add > AV_OPT_FLAG_CHILD_CONSTS > > This will be used for AVCodecContext->profile. By specifying constants in t

[FFmpeg-devel] [PATCH 5/5] avformat/webmdashenc: Simplify parsing strings

2020-05-17 Thread Andreas Rheinhardt
Don't use the functions for searching substrings when all one is looking for is a char anyway. Given that there is already a standard library function for "find last occurence of a char in a string" also allows one to remove a custom loop. Signed-off-by: Andreas Rheinhardt --- libavformat/webmda

[FFmpeg-devel] [PATCH 4/5] avformat/webmdashenc: Don't segfault on invalid arguments

2020-05-17 Thread Andreas Rheinhardt
The current parsing process for adaptation_sets does not guarantee every adaptation set to contain at least one stream, because the loop exits immediately as soon as the end of the string has been reached, without checking whether the currently active adaptation set group is lacking a stream. This

[FFmpeg-devel] [PATCH 3/5] avformat/webmdashenc: Remove possibility of infinite loop

2020-05-17 Thread Andreas Rheinhardt
The WebM DASH manifest muxer uses a loop to parse the adaptation_sets string (which is given by the user and governs which AVStreams are mapped to what adaptation set) and the very beginning of this loop is "if (*p == ' ') continue;". This of course leads to an infinite loop if the condition is tru

[FFmpeg-devel] [PATCH 1/5] avformat/webmdashenc: Avoid allocation for parsing a number

2020-05-17 Thread Andreas Rheinhardt
In order to parse a number from a string, the WebM DASH manifest muxer would duplicate (via heap-allocation) the part of the string that contains the number, then read the number via atoi() and then free the duplicate again. This has been replaced by simply using strtoll() (which in contrast to ato

[FFmpeg-devel] [PATCH 2/5] avformat/webmdashenc: Be more strict when parsing stream indices

2020-05-17 Thread Andreas Rheinhardt
The syntax of the adaptation_sets string by which the user determines the mapping of AVStreams to adaptation sets is "id=x,streams=a,b,c id=y,streams=d,e" (means: the streams with the indices a, b and c belong to the adaptation set with id x). Yet there was no check for whether these indices were a

Re: [FFmpeg-devel] [PATCH] avformat/hlsenc: Don't segfault on uncommon names

2020-05-17 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Andreas Rheinhardt: >> The parsing process of the AVOpt-enabled string controlling the mapping >> of input streams to variant streams is roughly as follows: Space and tab >> separate variant stream group maps while the entries in each variant >> stream group map are separated

Re: [FFmpeg-devel] [PATCH 07/13] avformat/matroskaenc: Don't segfault when seekability changes

2020-05-17 Thread Andreas Rheinhardt
Andreas Rheinhardt: > If the Matroska muxer's AVIOContext was unseekable when writing the > header, but is seekable when writing the trailer, the code for writing > the trailer presumes that a dynamic buffer exists and tries to update > its content in order to overwrite data that has already been >

[FFmpeg-devel] [PATCH 4/6] avcodec/xiph: Return better error codes

2020-05-17 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- There is another "return -1" left which might either be invalid data or an unsupported future extension of the format (e.g. one that does not have three arrays). I left this as is. libavcodec/xiph.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[FFmpeg-devel] [PATCH 3/6] avformat/matroskaenc: Forward errors from avpriv_split_xiph_headers()

2020-05-17 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/matroskaenc.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 99b549ecc4..1b6e80da36 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@

[FFmpeg-devel] [PATCH 6/6] avformat/webm_chunk: Open AVIOContext before initializing sub-muxer

2020-05-17 Thread Andreas Rheinhardt
The description of AVOutputFormat.init contains the statement that "this method must not write output". Due to this, the webm_chunk muxer defers opening the AVIOContext for the child muxer until avformat_write_header(), i.e. there is no AVIOContext when the sub-muxer's avformat_init_output() is cal

[FFmpeg-devel] [PATCH 2/6] avformat/segment: Propagate disposition

2020-05-17 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/segment.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/segment.c b/libavformat/segment.c index 7e8bd65976..2ff2b5372e 100644 --- a/libavformat/segment.c +++ b/libavformat/segment.c @@ -179,6 +179,7 @@ static int segment_mux_init

[FFmpeg-devel] [PATCH 5/6] avformat/matroskadec: Use proper context for logging

2020-05-17 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/matroskadec.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index b277c05f9d..81e7b16821 100644 --- a/libavformat/matroskadec.c +++ b/libavfor

[FFmpeg-devel] [PATCH 1/6] avformat/segment: Access AVStream more directly

2020-05-17 Thread Andreas Rheinhardt
by storing s->streams[i] in a pointer instead of constantly using s->streams[i]->... Signed-off-by: Andreas Rheinhardt --- libavformat/segment.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/libavformat/segment.c b/libavformat/segment.c index 32c09827eb..7

Re: [FFmpeg-devel] [PATCH] avformat/mpegts: Shuffle avio_seek

2020-05-17 Thread Michael Niedermayer
On Sun, May 17, 2020 at 02:11:19PM +0200, Marton Balint wrote: > > > On Thu, 7 May 2020, Michael Niedermayer wrote: > > >On Thu, May 07, 2020 at 02:09:43PM +0200, Anton Khirnov wrote: > >>Quoting Michael Niedermayer (2020-05-07 12:38:26) > >>>This avoids accessing an old, no longer valid buffer.

Re: [FFmpeg-devel] [PATCH] avcodec/frame_thread_encoder: remove usage of avcodec_encode_video2()

2020-05-17 Thread James Almer
On 5/17/2020 12:37 PM, Carl Eugen Hoyos wrote: > > >> Am 17.05.2020 um 16:07 schrieb James Almer : >> >> Call the encoder's internal AVCodec.encode2() function instead. > > Is there a performance impact? > > Carl Eugen None that i have noticed. ___ f

Re: [FFmpeg-devel] [PATCH] avcodec/frame_thread_encoder: remove usage of avcodec_encode_video2()

2020-05-17 Thread Carl Eugen Hoyos
> Am 17.05.2020 um 16:07 schrieb James Almer : > > Call the encoder's internal AVCodec.encode2() function instead. Is there a performance impact? Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffm

[FFmpeg-devel] [PATCH] avcodec/frame_thread_encoder: remove usage of avcodec_encode_video2()

2020-05-17 Thread James Almer
Call the encoder's internal AVCodec.encode2() function instead. Signed-off-by: James Almer --- libavcodec/encode.c | 20 libavcodec/frame_thread_encoder.c | 14 -- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/libavcodec/encode.c

Re: [FFmpeg-devel] [PATCH] avformat/mpegts: Check the next sync byte to avoid incorrectt detected raw packet size

2020-05-17 Thread Marton Balint
On Sun, 17 May 2020, lance.lmw...@gmail.com wrote: On Sat, May 16, 2020 at 07:36:45PM +0200, Marton Balint wrote: On Sat, 16 May 2020, lance.lmw...@gmail.com wrote: > On Sat, May 16, 2020 at 11:44:01AM +0200, Marton Balint wrote: > > > > > > On Sat, 16 May 2020, lance.lmw...@gmail.com wr

Re: [FFmpeg-devel] [PATCH] avformat/dump: Use int64_t for intermediate time values

2020-05-17 Thread Derek Buitenhuis
On 17/05/2020 12:16, Paul B Mahol wrote: > LGTM Pushed, thanks. - Derek ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org wi

Re: [FFmpeg-devel] [PATCH] avformat/mpegts: Shuffle avio_seek

2020-05-17 Thread Marton Balint
On Thu, 7 May 2020, Michael Niedermayer wrote: On Thu, May 07, 2020 at 02:09:43PM +0200, Anton Khirnov wrote: Quoting Michael Niedermayer (2020-05-07 12:38:26) This avoids accessing an old, no longer valid buffer. Fixes: out of array access Fixes: crash_audio-2020 Found-by: le wu Signed-of

Re: [FFmpeg-devel] [PATCH] avformat/dump: Use int64_t for intermediate time values

2020-05-17 Thread Paul B Mahol
LGTM On 5/16/20, Derek Buitenhuis wrote: > Prevents wrap-around to negative values while calculating the duration > string. > > Before: > > Duration: -411422:-59:-42.17, start: 0.00, bitrate: 0 kb/s > > After: > > Duration: 781623:28:34.17, start: 0.00, bitrate: 0 kb/s > > Signed-

[FFmpeg-devel] [PATCH v2] avformat/mpegts: Fix misdetection of the raw packet size

2020-05-17 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavformat/mpegts.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 0833d62..4bca339 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -2852,6 +2852,8 @@ static void reanalyze(M

Re: [FFmpeg-devel] [PATCH] avformat/mpegts: Check the next sync byte to avoid incorrectt detected raw packet size

2020-05-17 Thread lance . lmwang
On Sat, May 16, 2020 at 07:36:45PM +0200, Marton Balint wrote: > > > On Sat, 16 May 2020, lance.lmw...@gmail.com wrote: > > > On Sat, May 16, 2020 at 11:44:01AM +0200, Marton Balint wrote: > > > > > > > > > On Sat, 16 May 2020, lance.lmw...@gmail.com wrote: > > > > > > > On Fri, May 15, 2020

[FFmpeg-devel] [PATCH 1/3] lavc/aac_ac3_parser: improve the raw AAC file bit rate calculation

2020-05-17 Thread Jun Zhao
From: Jun Zhao Now we just use one ADTS raw frame to calculate the bit rate, it's lead to a larger error when get the duration from bit rate, the improvement cumulate Nth ADTS frames to get the average bit rate. e,g used the command get the duration like: ffprobe -show_entries format=duration -i

[FFmpeg-devel] [PATCH 3/3] lavf/utils: Reindent after previous commit

2020-05-17 Thread Jun Zhao
From: Jun Zhao Reindent after previous commit. Signed-off-by: Jun Zhao --- libavformat/utils.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index d7fdd72..1798f70 100644 --- a/libavformat/utils.c +++ b/libavfor

[FFmpeg-devel] [PATCH 2/3] lavf/utils: fix start_time dump when the value is AV_NOPTS_VALUE

2020-05-17 Thread Jun Zhao
From: Jun Zhao The command: ffprobe -show_format -i ../fate-suite/aac/foo.aac -loglevel 99 will dump the trace message as follow when start_time is AV_NOPTS_VALUE [aac @ 0x55bf8e1f3dc0] stream 0: start_time: -326791809695.818 duration: 2.174 [aac @ 0x55bf8e1f3dc0] format: start_time: -92233720368