Commit efe38c85 authored by Jan Gerber's avatar Jan Gerber
Browse files

resample if sample_fmt does not match, fixed #1561

parent b2d2d933
......@@ -778,7 +778,9 @@ void ff2theora_output(ff2theora this) {
}
if (acodec != NULL && avcodec_open (aenc, acodec) >= 0) {
if (this->sample_rate != aenc->sample_rate || this->channels != aenc->channels) {
if (this->sample_rate != aenc->sample_rate
|| this->channels != aenc->channels
|| aenc->sample_fmt != SAMPLE_FMT_S16) {
// values take from libavcodec/resample.c
this->audio_resample_ctx = av_audio_resample_init(this->channels, aenc->channels,
this->sample_rate, aenc->sample_rate,
......
Supports Markdown
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