Re: [FFmpeg-devel] [PATCH] lavf/async: Fix wrapped_url_read return value

2022-09-29 Thread Guangyu Sun
On Wed, Sep 28, 2022 at 7:08 AM Anton Khirnov wrote: > > Quoting Guangyu Sun (2022-09-19 07:22:39) > > This fixes a regression from commit 36117968ad. > > > > wrapped_url_read() used to be able to return positive number from > > ffurl_read(). It relies on the result

[FFmpeg-devel] [PATCH v2] lavf/async: Fix ring_write return value

2022-09-29 Thread Guangyu Sun
. Test case: ffmpeg -f lavfi -i testsrc -t 1 test.mp4 ffmpeg -i async:test.mp4 Signed-off-by: Guangyu Sun --- libavformat/async.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libavformat/async.c b/libavformat/async.c index 547417aa1e..3c6f89cab9 100644 --- a

[FFmpeg-devel] [PATCH] lavf/async: Fix wrapped_url_read return value

2022-09-18 Thread Guangyu Sun
-by: Guangyu Sun --- libavformat/async.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/async.c b/libavformat/async.c index 547417aa1e..a929f4d16e 100644 --- a/libavformat/async.c +++ b/libavformat/async.c @@ -139,7 +139,7 @@ static int wrapped_url_read(void *src

Re: [FFmpeg-devel] [PATCH] avformat/oggparsevorbis: Fix oggvorbis duration parsing for small files

2022-05-16 Thread Guangyu Sun
On Mon, May 9, 2022 at 11:19 AM Guangyu Sun wrote: > On Thu, May 5, 2022 at 4:05 PM Guangyu Sun wrote: > >> The decoded Data is not returned from the first frame; it must be used >> to 'prime' the decode engine. The duration of the first packet should >> be

Re: [FFmpeg-devel] [PATCH] avformat/oggparsevorbis: Fix oggvorbis duration parsing for small files

2022-05-09 Thread Guangyu Sun
On Thu, May 5, 2022 at 4:05 PM Guangyu Sun wrote: > The decoded Data is not returned from the first frame; it must be used > to 'prime' the decode engine. The duration of the first packet should > be ignored also by the container, to make sure the total duration is > tri

[FFmpeg-devel] [PATCH] avformat/oggparsevorbis: Fix oggvorbis duration parsing for small files

2022-05-05 Thread Guangyu Sun
pcm_s16le silence.native.ffmpeg.raw ls -l *.raw Signed-off-by: Guangyu Sun --- libavformat/oggparsevorbis.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c index 289900f7cf..9a486c9fe8 100644 --- a/libavformat/oggparsevorb

Re: [FFmpeg-devel] [PATCH] avformat/oggparsevorbis: Ignore duration of the first packet

2022-05-02 Thread Guangyu Sun
On Wed, Apr 20, 2022 at 8:22 PM Guangyu Sun wrote: > The decoded Data is not returned from the first frame; it must be used > to 'prime' the decode engine. The duration of the first packet should > be ignored also by the container, to make sure the total duration is > trimm

[FFmpeg-devel] [PATCH] avformat/oggparsevorbis: Ignore duration of the first packet

2022-04-20 Thread Guangyu Sun
aw Signed-off-by: Guangyu Sun --- libavformat/oggparsevorbis.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c index 289900f7cf..1f922b3c7e 100644 --- a/libavformat/oggparsevorbis.c +++ b/libavformat/oggparsevorbis.c @@ -479

Re: [FFmpeg-devel] [PATCH 3/3] fate/oggvorbis: Fix tests after fixing AV_PKT_DATA_SKIP_SAMPLES

2021-07-09 Thread Guangyu Sun
original vorbis_chapter_extension_demo.ogg is transmuxed to dash-webm. > > The ref file webm-dash-chapters needs to be updated. > > > > fate-vorbis-encode: > > This exposes another bug in the vorbis encoder that initial_padding is not > > correctly set. It is fixed in the pre

[FFmpeg-devel] [PATCH] fate/oggvorbis: Fix tests after fixing AV_PKT_DATA_SKIP_SAMPLES

2021-07-09 Thread Guangyu Sun
ref file webm-dash-chapters needs to be updated. fate-vorbis-encode: This exposes another bug in the vorbis encoder that initial_padding is not correctly set. It is fixed in the previous patch. Signed-off-by: Guangyu Sun --- tests/fate/vorbis.mak | 1 + tests/ref/fate/webm-dash

[FFmpeg-devel] [PATCH 2/3] libavcodec/vorbisenc: Add missing initial_padding

2021-07-07 Thread Guangyu Sun
(). Signed-off-by: Guangyu Sun --- libavcodec/vorbisenc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/vorbisenc.c b/libavcodec/vorbisenc.c index 332c09f9a1..72c6ba1130 100644 --- a/libavcodec/vorbisenc.c +++ b/libavcodec/vorbisenc.c @@ -1287,6 +1287,7 @@ static av_cold int

[FFmpeg-devel] [PATCH 1/3] avformat/oggparsevorbis: Update end_trimming for the last packet

2021-07-07 Thread Guangyu Sun
ion. We probably need a more complicated patch to address this issue. Signed-off-by: Guangyu Sun --- libavformat/oggparsevorbis.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c index 0e8c25c030..c48658ceda 100

[FFmpeg-devel] [PATCH 3/3] fate/oggvorbis: Fix tests after fixing AV_PKT_DATA_SKIP_SAMPLES

2021-07-07 Thread Guangyu Sun
initial_padding is not correctly set. It is fixed in the previous patch. Signed-off-by: Guangyu Sun --- tests/fate/vorbis.mak | 2 +- tests/ref/fate/webm-dash-chapters | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/fate/vorbis.mak b/tests/fate/vorbis.mak index

Re: [FFmpeg-devel] [PATCH] avformat/oggparsevorbis: Update end_trimming for the last packet

2021-07-07 Thread Guangyu Sun
On Wed, Jul 7, 2021 at 2:41 AM Lynne wrote: > > 6 Jul 2021, 18:21 by sunguangy...@gmail.com: > > > On Tue, Jul 6, 2021 at 1:15 AM Lynne wrote: > > > >> > >> 6 Jul 2021, 08:02 by sunguangy...@gmail.com: > >> > >> >

Re: [FFmpeg-devel] [PATCH] avformat/oggparsevorbis: Update end_trimming for the last packet

2021-07-06 Thread Guangyu Sun
On Tue, Jul 6, 2021 at 1:15 AM Lynne wrote: > > 6 Jul 2021, 08:02 by sunguangy...@gmail.com: > > > On Mon, Jun 21, 2021 at 9:06 AM Guangyu Sun wrote: > > > >> > >> From: Guangyu Sun > >> > >> Without end_trimming, the last pac

Re: [FFmpeg-devel] [PATCH] avformat/oggparsevorbis: Update end_trimming for the last packet

2021-07-05 Thread Guangyu Sun
On Mon, Jun 21, 2021 at 9:06 AM Guangyu Sun wrote: > > From: Guangyu Sun > > Without end_trimming, the last packet will contain unexpected samples used > for padding. > > This commit partially fixes #6367 when the audio length is long enough. > > dd if=/dev/zero of=./

[FFmpeg-devel] [PATCH] avformat/oggparsevorbis: Update end_trimming for the last packet

2021-06-21 Thread Guangyu Sun
From: Guangyu Sun Without end_trimming, the last packet will contain unexpected samples used for padding. This commit partially fixes #6367 when the audio length is long enough. dd if=/dev/zero of=./silence.raw count=20 bs=500 oggenc --raw silence.raw --output=silence.ogg oggdec --raw --output