mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'ffmpeg' of https://github.com/eli-schwartz/calibre
This commit is contained in:
commit
159750527b
@ -240,7 +240,7 @@ open_output_file(Transcoder *t) {
|
|||||||
av_channel_layout_default(&t->enc_ctx->ch_layout, t->dec_ctx->ch_layout.nb_channels);
|
av_channel_layout_default(&t->enc_ctx->ch_layout, t->dec_ctx->ch_layout.nb_channels);
|
||||||
t->enc_ctx->sample_rate = t->dec_ctx->sample_rate;
|
t->enc_ctx->sample_rate = t->dec_ctx->sample_rate;
|
||||||
int ret;
|
int ret;
|
||||||
#if LIBAVCODEC_VERSION_MAJOR >= 61
|
#if LIBAVCODEC_VERSION_MAJOR >= 61 && LIBAVCODEC_VERSION_MINOR >= 14
|
||||||
const enum AVSampleFormat *sample_fmts = NULL;
|
const enum AVSampleFormat *sample_fmts = NULL;
|
||||||
ret = avcodec_get_supported_config(t->dec_ctx, output_codec, AV_CODEC_CONFIG_SAMPLE_FORMAT, 0, (const void**)&sample_fmts, NULL);
|
ret = avcodec_get_supported_config(t->dec_ctx, output_codec, AV_CODEC_CONFIG_SAMPLE_FORMAT, 0, (const void**)&sample_fmts, NULL);
|
||||||
t->enc_ctx->sample_fmt = (ret >= 0 && sample_fmts) ? sample_fmts[0] : t->dec_ctx->sample_fmt;
|
t->enc_ctx->sample_fmt = (ret >= 0 && sample_fmts) ? sample_fmts[0] : t->dec_ctx->sample_fmt;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user