1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00
FFmpeg/libswresample
Gyan Doshi be8a4f80b9 swr/swresample: avoid reapplication of firstpts
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.
2023-12-18 15:47:04 +05:30
..
aarch64 aarch64: Reindent all assembly to 8/24 column indentation 2023-10-21 23:25:54 +03:00
arm Include attributes.h directly 2021-04-19 14:34:10 +02:00
tests swresample: convert to new channel layout API 2022-03-15 09:42:46 -03:00
x86 swresample/swresample: add a used channel layout option using the new API 2023-02-19 18:28:45 -03:00
audioconvert.c all: Replace if (ARCH_FOO) checks by #if ARCH_FOO 2022-06-15 04:56:37 +02:00
audioconvert.h avutil/internal, swresample/audioconvert: Remove cpu.h inclusions 2021-07-22 14:33:45 +02:00
dither_template.c
dither.c
libswresample.v
log2_tab.c
Makefile configure: always enable gnu_windres if available 2022-08-13 14:42:36 +02:00
noise_shaping_data.c swresample/noise_shaping_data: Remove unused tables 2022-06-15 04:58:14 +02:00
options.c swr/swresample: avoid reapplication of firstpts 2023-12-18 15:47:04 +05:30
rematrix_template.c swresample: convert to new channel layout API 2022-03-15 09:42:46 -03:00
rematrix.c swresample/swresample: add a used channel layout option using the new API 2023-02-19 18:28:45 -03:00
resample_dsp.c all: Replace if (ARCH_FOO) checks by #if ARCH_FOO 2022-06-15 04:56:37 +02:00
resample_template.c
resample.c Move bessel_i0() from swresample/resample to avutil/mathematics 2023-05-29 00:45:28 +02:00
resample.h
soxr_resample.c
swresample_frame.c swresample/swresample_frame: fix regression in detecting changes 2023-01-04 18:19:07 +01:00
swresample_internal.h swresample/swresample: add a used channel layout option using the new API 2023-02-19 18:28:45 -03:00
swresample.c swr/swresample: avoid reapplication of firstpts 2023-12-18 15:47:04 +05:30
swresample.h swresample: Fix Doxy reference to AVOptions 2022-10-17 09:55:19 +02:00
swresampleres.rc
version_major.h libswresample: Split version.h 2022-03-16 14:05:26 +02:00
version.c lib*/version: Move library version functions into files of their own 2022-05-10 06:49:32 +02:00
version.h Bump versions after 6.1 2023-10-29 16:19:14 +01:00