summaryrefslogtreecommitdiff
path: root/fftools
diff options
context:
space:
mode:
authorJosh de Kock <josh@itanimul.li>2018-03-23 20:38:32 +0000
committerJosh de Kock <josh@itanimul.li>2018-03-31 23:26:31 +0100
commit22381906f3fd414d5c87593960903a1bf7797ee2 (patch)
tree8ac39a74d2aa387a17708839f945792d7bd1559a /fftools
parent65452bcd6416bf94193664a45816a055d2ff15b0 (diff)
cmdutils: use new APIs
Signed-off-by: Josh de Kock <josh@itanimul.li>
Diffstat (limited to 'fftools')
-rw-r--r--fftools/cmdutils.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
index c0ddf0b287..a6cf002fd0 100644
--- a/fftools/cmdutils.c
+++ b/fftools/cmdutils.c
@@ -1259,8 +1259,10 @@ static int is_device(const AVClass *avclass)
static int show_formats_devices(void *optctx, const char *opt, const char *arg, int device_only, int muxdemuxers)
{
- AVInputFormat *ifmt = NULL;
- AVOutputFormat *ofmt = NULL;
+ void *ifmt_opaque = NULL;
+ const AVInputFormat *ifmt = NULL;
+ void *ofmt_opaque = NULL;
+ const AVOutputFormat *ofmt = NULL;
const char *last_name;
int is_dev;
@@ -1276,7 +1278,8 @@ static int show_formats_devices(void *optctx, const char *opt, const char *arg,
const char *long_name = NULL;
if (muxdemuxers !=SHOW_DEMUXERS) {
- while ((ofmt = av_oformat_next(ofmt))) {
+ ifmt_opaque = NULL;
+ while ((ofmt = av_muxer_iterate(&ofmt_opaque))) {
is_dev = is_device(ofmt->priv_class);
if (!is_dev && device_only)
continue;
@@ -1289,7 +1292,8 @@ static int show_formats_devices(void *optctx, const char *opt, const char *arg,
}
}
if (muxdemuxers != SHOW_MUXERS) {
- while ((ifmt = av_iformat_next(ifmt))) {
+ ofmt_opaque = NULL;
+ while ((ifmt = av_demuxer_iterate(&ifmt_opaque))) {
is_dev = is_device(ifmt->priv_class);
if (!is_dev && device_only)
continue;
@@ -1629,6 +1633,7 @@ int show_filters(void *optctx, const char *opt, const char *arg)
#if CONFIG_AVFILTER
const AVFilter *filter = NULL;
char descr[64], *descr_cur;
+ void *opaque = NULL;
int i, j;
const AVFilterPad *pad;
@@ -1640,7 +1645,7 @@ int show_filters(void *optctx, const char *opt, const char *arg)
" V = Video input/output\n"
" N = Dynamic number and/or type of input/output\n"
" | = Source or sink filter\n");
- while ((filter = avfilter_next(filter))) {
+ while ((filter = av_filter_iterate(&opaque))) {
descr_cur = descr;
for (i = 0; i < 2; i++) {
if (i) {