[FFmpeg-cvslog] tools/fourcc2pixfmt: fix usages of av_get_codec_tag_string()
Clément Bœsch
git at videolan.org
Wed Mar 29 15:55:03 EEST 2017
ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Mon Mar 27 01:32:13 2017 +0200| [337c68d07142d1eeb540d73e2049896b9ab4f04e] | committer: Clément Bœsch
tools/fourcc2pixfmt: fix usages of av_get_codec_tag_string()
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=337c68d07142d1eeb540d73e2049896b9ab4f04e
---
tools/fourcc2pixfmt.c | 21 +++++++--------------
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/tools/fourcc2pixfmt.c b/tools/fourcc2pixfmt.c
index 625f531..75bb607 100644
--- a/tools/fourcc2pixfmt.c
+++ b/tools/fourcc2pixfmt.c
@@ -51,13 +51,9 @@ static void print_pix_fmt_fourccs(enum AVPixelFormat pix_fmt, const PixelFormatT
{
int i;
- 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), pix_fmt_tags[i].fourcc);
- printf("%s%c", buf, sep);
- }
- }
+ for (i = 0; pix_fmt_tags[i].pix_fmt != AV_PIX_FMT_NONE; i++)
+ if (pix_fmt_tags[i].pix_fmt == pix_fmt)
+ printf("%s%c", av_fourcc2str(pix_fmt_tags[i].fourcc), sep);
}
int main(int argc, char **argv)
@@ -92,13 +88,10 @@ int main(int argc, char **argv)
}
}
- if (list_fourcc_pix_fmt) {
- 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), pix_fmt_tags[i].fourcc);
- printf("%s: %s\n", buf, av_get_pix_fmt_name(pix_fmt_tags[i].pix_fmt));
- }
- }
+ if (list_fourcc_pix_fmt)
+ for (i = 0; pix_fmt_tags[i].pix_fmt != AV_PIX_FMT_NONE; i++)
+ printf("%s: %s\n", av_fourcc2str(pix_fmt_tags[i].fourcc),
+ av_get_pix_fmt_name(pix_fmt_tags[i].pix_fmt));
if (list_pix_fmt_fourccs) {
for (i = 0; av_pix_fmt_desc_get(i); i++) {
More information about the ffmpeg-cvslog
mailing list