[FFmpeg-cvslog] fftools/ffmpeg_filter: Remove choose_sample_fmt
Andreas Rheinhardt
git at videolan.org
Wed Feb 3 01:06:35 EET 2021
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Fri Jan 29 02:26:15 2021 +0100| [a40c158edac80396fbcd5f3e1fe195bf15eeec9c] | committer: Andreas Rheinhardt
fftools/ffmpeg_filter: Remove choose_sample_fmt
Unused since 6b35a83214f1bc3fb38c9ea9c2cd3676f28709fa.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a40c158edac80396fbcd5f3e1fe195bf15eeec9c
---
fftools/ffmpeg.h | 1 -
fftools/ffmpeg_filter.c | 23 -----------------------
2 files changed, 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;
More information about the ffmpeg-cvslog
mailing list