summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2011-03-12 12:44:22 +0100
committerAnton Khirnov <anton@khirnov.net>2011-05-10 07:14:13 +0200
commit5d2c6f42d74680dbb2f94c16770114f18c2d2fd0 (patch)
tree2b790c69eb17a927c6ae79cb83ac66be6c4e24e7 /ffmpeg.c
parentc3e40410d4a932c6f27b0217e0ab705f03841078 (diff)
cmdutils: remove list_fmts(), simplify
The function was only used in opt_sample_fmt() for listing the sample formats. Move list_fmts() functionality directly into opt_sample_fmt(). Also fix the warning: ffmpeg.c: In function ‘opt_audio_sample_fmt’: ffmpeg.c:2877: warning: passing argument 1 of ‘list_fmts’ from incompatible pointer type cmdutils.h:163: note: expected ‘void (*)(char *, int, int)’ but argument is of type ‘char * (*)(char *, int, enum AVSampleFormat)’ Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index cadb654eb0..90fc37105b 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2859,7 +2859,10 @@ static void opt_audio_sample_fmt(const char *arg)
ffmpeg_exit(1);
}
} else {
- list_fmts(av_get_sample_fmt_string, AV_SAMPLE_FMT_NB);
+ int i;
+ char fmt_str[128];
+ for (i = -1; i < AV_SAMPLE_FMT_NB; i++)
+ printf("%s\n", av_get_sample_fmt_string(fmt_str, sizeof(fmt_str), i));
ffmpeg_exit(0);
}
}