From: Gyan Doshi <ffmpeg@gyani.pro>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH v3] swr/swresample: avoid reapplication of firstpts
Date: Mon, 18 Dec 2023 15:50:49 +0530
Message-ID: <510f0001-a9f2-415f-9276-752d33a666bb@gyani.pro> (raw)
In-Reply-To: <a8778089-3c5e-4a27-915b-628089f9871e@gyani.pro>
On 2023-12-18 09:31 am, Gyan Doshi wrote:
>
>
> On 2023-12-16 03:44 pm, Gyan Doshi wrote:
>> During a resampling operation where
>>
>> 1) user has specified first_pts
>> 2) SWR_FLAG_RESAMPLE is not set initially (directly or otherwise)
>> 3) first_pts has been fulfilled (always using hard compensation)
>>
>> then upon first encountering a delay where a soft compensation is
>> required, swr_set_compensation will lead to another init of swr which
>> will reset outpts to the specified firstpts thus leading to an output
>> frame having its pts = firstpts. When the next input frame is received,
>> swr will see a large delay and inject silence from firstpts to the
>> current frame's pts. This can lead to severe desync and in worst case,
>> loss of audio playback.
>>
>> Parameter firstpts initialized to AV_NOPTS_VALUE in swr_alloc and then
>> checked in swr_init to avoid resetting outpts, thus avoiding
>> reapplication
>> of firstpts.
>>
>> Fixes #4131.
>> ---
>> Added fate test
>
> Plan to push soon.
Pushed as be8a4f80b97222d99b4262c9230ca8a1db28973a
Regards,
Gyan
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
prev parent reply other threads:[~2023-12-18 10:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-16 10:14 Gyan Doshi
2023-12-18 4:01 ` Gyan Doshi
2023-12-18 10:20 ` Gyan Doshi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=510f0001-a9f2-415f-9276-752d33a666bb@gyani.pro \
--to=ffmpeg@gyani.pro \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git