1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-11-23 21:54:53 +02:00

libswresample: introduce int swr_set_compensation() instead of void swr_compensate()

The new version returns AVERROR(EINVAL) is the specified paramters are invalid,
and also creates the resampler if none was used so far.

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Marton Balint
2012-01-09 01:42:38 +01:00
committed by Michael Niedermayer
parent 3e9668501d
commit 741aca7936
3 changed files with 23 additions and 7 deletions

View File

@@ -1160,7 +1160,7 @@ need_realloc:
av_log(NULL, AV_LOG_VERBOSE, "compensating audio timestamp drift:%f compensation:%d in:%d\n",
delta, comp, enc->sample_rate);
// fprintf(stderr, "drift:%f len:%d opts:%"PRId64" ipts:%"PRId64" fifo:%d\n", delta, -1, ost->sync_opts, (int64_t)(get_sync_ipts(ost) * enc->sample_rate), av_fifo_size(ost->fifo)/(ost->st->codec->channels * 2));
swr_compensate(ost->swr, comp, enc->sample_rate);
swr_set_compensation(ost->swr, comp, enc->sample_rate);
}
}
} else