diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-01-29 02:26:15 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-02-02 23:53:30 +0100 |
commit | a40c158edac80396fbcd5f3e1fe195bf15eeec9c (patch) | |
tree | e77c8b8849cbbdcb41d67dcbb094fc70183ab9c6 | |
parent | bb072a0369ffbe6fa72b5bc907863e93b1d85d1a (diff) | |
download | ffmpeg-a40c158edac80396fbcd5f3e1fe195bf15eeec9c.tar.gz |
fftools/ffmpeg_filter: Remove choose_sample_fmt
Unused since 6b35a83214f1bc3fb38c9ea9c2cd3676f28709fa.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
-rw-r--r-- | fftools/ffmpeg.h | 1 | ||||
-rw-r--r-- | fftools/ffmpeg_filter.c | 23 |
2 files changed, 0 insertions, 24 deletions
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 8046e75026..6750432a81 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -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); diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 1cba3055cc..c2b7ece95d 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -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; |