diff options
author | James Almer <jamrial@gmail.com> | 2014-08-09 21:53:33 -0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-08-10 04:50:31 +0200 |
commit | ddce2b26544484893832668f96f2364402059d4a (patch) | |
tree | 149d982760cd2769de999a29412e64d7cb4efd94 /tools/fourcc2pixfmt.c | |
parent | e18d9d90f1d30feed02a0d973ee1c0e46f6abfd7 (diff) | |
download | ffmpeg-ddce2b26544484893832668f96f2364402059d4a.tar.gz |
tools/fourcc2pixfmt: use avpriv_get_raw_pix_fmt_tags()
lavc doesn't export ff_raw_pix_fmt_tags[] anymore.
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'tools/fourcc2pixfmt.c')
-rw-r--r-- | tools/fourcc2pixfmt.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/tools/fourcc2pixfmt.c b/tools/fourcc2pixfmt.c index 1cfdf6a907..625f531f5c 100644 --- a/tools/fourcc2pixfmt.c +++ b/tools/fourcc2pixfmt.c @@ -47,14 +47,14 @@ static void usage(void) "-h print this help\n"); } -static void print_pix_fmt_fourccs(enum AVPixelFormat pix_fmt, char sep) +static void print_pix_fmt_fourccs(enum AVPixelFormat pix_fmt, const PixelFormatTag *pix_fmt_tags, char sep) { int i; - for (i = 0; ff_raw_pix_fmt_tags[i].pix_fmt != AV_PIX_FMT_NONE; i++) { - if (ff_raw_pix_fmt_tags[i].pix_fmt == pix_fmt) { + for (i = 0; pix_fmt_tags[i].pix_fmt != AV_PIX_FMT_NONE; i++) { + if (pix_fmt_tags[i].pix_fmt == pix_fmt) { char buf[32]; - av_get_codec_tag_string(buf, sizeof(buf), ff_raw_pix_fmt_tags[i].fourcc); + av_get_codec_tag_string(buf, sizeof(buf), pix_fmt_tags[i].fourcc); printf("%s%c", buf, sep); } } @@ -63,6 +63,7 @@ static void print_pix_fmt_fourccs(enum AVPixelFormat pix_fmt, char sep) int main(int argc, char **argv) { int i, list_fourcc_pix_fmt = 0, list_pix_fmt_fourccs = 0; + const PixelFormatTag *pix_fmt_tags = avpriv_get_raw_pix_fmt_tags(); const char *pix_fmt_name = NULL; char c; @@ -92,10 +93,10 @@ int main(int argc, char **argv) } if (list_fourcc_pix_fmt) { - for (i = 0; ff_raw_pix_fmt_tags[i].pix_fmt != AV_PIX_FMT_NONE; i++) { + for (i = 0; pix_fmt_tags[i].pix_fmt != AV_PIX_FMT_NONE; i++) { char buf[32]; - av_get_codec_tag_string(buf, sizeof(buf), ff_raw_pix_fmt_tags[i].fourcc); - printf("%s: %s\n", buf, av_get_pix_fmt_name(ff_raw_pix_fmt_tags[i].pix_fmt)); + av_get_codec_tag_string(buf, sizeof(buf), pix_fmt_tags[i].fourcc); + printf("%s: %s\n", buf, av_get_pix_fmt_name(pix_fmt_tags[i].pix_fmt)); } } @@ -105,7 +106,7 @@ int main(int argc, char **argv) if (!pix_desc->name || pix_desc->flags & AV_PIX_FMT_FLAG_HWACCEL) continue; printf("%s: ", pix_desc->name); - print_pix_fmt_fourccs(i, ' '); + print_pix_fmt_fourccs(i, pix_fmt_tags, ' '); printf("\n"); } } @@ -116,7 +117,7 @@ int main(int argc, char **argv) fprintf(stderr, "Invalid pixel format selected '%s'\n", pix_fmt_name); return 1; } - print_pix_fmt_fourccs(pix_fmt, '\n'); + print_pix_fmt_fourccs(pix_fmt, pix_fmt_tags, '\n'); } return 0; |