1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

fftools/ffmpeg_filter: Remove choose_sample_fmt

Unused since 6b35a83214.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
Andreas Rheinhardt 2021-01-29 02:26:15 +01:00
parent bb072a0369
commit a40c158eda
2 changed files with 0 additions and 24 deletions

View File

@ -652,7 +652,6 @@ int guess_input_channel_layout(InputStream *ist);
enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodecContext *avctx,
const AVCodec *codec, enum AVPixelFormat target);
void choose_sample_fmt(AVStream *st, const AVCodec *codec);
int configure_filtergraph(FilterGraph *fg);
int configure_output_filter(FilterGraph *fg, OutputFilter *ofilter, AVFilterInOut *out);

View File

@ -91,29 +91,6 @@ enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodecContext *enc_ctx,
return target;
}
void choose_sample_fmt(AVStream *st, const AVCodec *codec)
{
if (codec && codec->sample_fmts) {
const enum AVSampleFormat *p = codec->sample_fmts;
for (; *p != -1; p++) {
if (*p == st->codecpar->format)
break;
}
if (*p == -1) {
const AVCodecDescriptor *desc = avcodec_descriptor_get(codec->id);
if(desc && (desc->props & AV_CODEC_PROP_LOSSLESS) && av_get_sample_fmt_name(st->codecpar->format) > av_get_sample_fmt_name(codec->sample_fmts[0]))
av_log(NULL, AV_LOG_ERROR, "Conversion will not be lossless.\n");
if(av_get_sample_fmt_name(st->codecpar->format))
av_log(NULL, AV_LOG_WARNING,
"Incompatible sample format '%s' for codec '%s', auto-selecting format '%s'\n",
av_get_sample_fmt_name(st->codecpar->format),
codec->name,
av_get_sample_fmt_name(codec->sample_fmts[0]));
st->codecpar->format = codec->sample_fmts[0];
}
}
}
static char *choose_pix_fmts(OutputFilter *ofilter)
{
OutputStream *ost = ofilter->ost;