Commit 07b48f8c authored by Stefano Sabatini's avatar Stefano Sabatini Committed by Mans Rullgard
Browse files

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: default avatarMans Rullgard <mans@mansr.com>
parent 78f318be
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment