From patchwork Mon Mar 27 07:51:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgQsWTc2No?= X-Patchwork-Id: 3115 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.44.195 with SMTP id s186csp51898vss; Mon, 27 Mar 2017 00:53:02 -0700 (PDT) X-Received: by 10.223.145.68 with SMTP id j62mr18973218wrj.44.1490601182250; Mon, 27 Mar 2017 00:53:02 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id r65si13550380wrb.121.2017.03.27.00.53.01; Mon, 27 Mar 2017 00:53:02 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F0B286883A8; Mon, 27 Mar 2017 10:52:00 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from golem.pkh.me (LStLambert-657-1-117-164.w92-154.abo.wanadoo.fr [92.154.28.164]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1A0CF688381 for ; Mon, 27 Mar 2017 10:51:53 +0300 (EEST) Received: from localhost (golem.pkh.me [local]) by golem.pkh.me (OpenSMTPD) with ESMTPA id 1e81c4bb; Mon, 27 Mar 2017 07:52:04 +0000 (UTC) From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= To: ffmpeg-devel@ffmpeg.org Date: Mon, 27 Mar 2017 09:51:58 +0200 Message-Id: <20170327075203.7499-5-u@pkh.me> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170327075203.7499-1-u@pkh.me> References: <20170327075203.7499-1-u@pkh.me> Subject: [FFmpeg-devel] [PATCH 05/10] tools/fourcc2pixfmt: fix usages of av_get_codec_tag_string() X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- tools/fourcc2pixfmt.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/tools/fourcc2pixfmt.c b/tools/fourcc2pixfmt.c index 625f531f5c..1882e218bd 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_4cc2str(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_4cc2str(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++) {