Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 0b2bab2cec..56b2dbed5e 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -825,7 +825,9 @@ need_realloc:
if (ost->resample)
audio_resample_close(ost->resample);
}
- if (ost->resample_sample_fmt == enc->sample_fmt &&
+ /* if audio_sync_method is >1 the resampler is needed for audio drift compensation */
+ if (audio_sync_method <= 1 &&
+ ost->resample_sample_fmt == enc->sample_fmt &&
ost->resample_channels == enc->channels &&
ost->resample_sample_rate == enc->sample_rate) {
ost->resample = NULL;