diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-01-23 02:06:59 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-01-26 03:43:28 +0100 |
commit | 0f16f725527a5cedf2acc157d73d437bbe8b73d3 (patch) | |
tree | 9694b9f92ed57312a9361343b889aa7bbd650de1 /ffmpeg.c | |
parent | 0fc1961ecc1e9b09634923d067c5db7ee4774882 (diff) | |
download | ffmpeg-0f16f725527a5cedf2acc157d73d437bbe8b73d3.tar.gz |
Do not set audio_resample to 0 if audio_sync_method is > 1.
If audio_sync_method is >1 the resampler is used for audio drift
compensation, and do_audio_out() was causing an assert failure because
audio_resample was not set.
Fix issue 2516, which was introduced by SVN r25939.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 07b48f8c7adaaf4020514816ec9b8d14cc8c5fbd)
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; |