From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id D85F44595B for ; Fri, 28 Apr 2023 09:56:31 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AF4EF68BFEC; Fri, 28 Apr 2023 12:55:26 +0300 (EEST) Received: from nef.ens.fr (nef2.ens.fr [129.199.96.40]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5FBDB68BFAE for ; Fri, 28 Apr 2023 12:55:17 +0300 (EEST) X-ENS-nef-client: 129.199.129.80 ( name = phare.normalesup.org ) Received: from phare.normalesup.org (phare.normalesup.org [129.199.129.80]) by nef.ens.fr (8.14.4/1.01.28121999) with ESMTP id 33S9tGPS014824 for ; Fri, 28 Apr 2023 11:55:16 +0200 Received: by phare.normalesup.org (Postfix, from userid 1001) id AFD43EB5BF; Fri, 28 Apr 2023 11:55:16 +0200 (CEST) From: Nicolas George To: ffmpeg-devel@ffmpeg.org Date: Fri, 28 Apr 2023 11:55:08 +0200 Message-Id: <20230428095508.221826-8-george@nsup.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230428095508.221826-1-george@nsup.org> References: <20230428095508.221826-1-george@nsup.org> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (nef.ens.fr [129.199.96.32]); Fri, 28 Apr 2023 11:55:16 +0200 (CEST) Subject: [FFmpeg-devel] [PATCH 8/8] lavf/dump: use av_disposition_write() X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: It changes the output to have underscores instead of spaces. Signed-off-by: Nicolas George --- libavformat/dump.c | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) Note: I consider the change to backspaces good: now we can copy-paste from dump directly into a command-line. diff --git a/libavformat/dump.c b/libavformat/dump.c index 96b364e337..8b55e60b6a 100644 --- a/libavformat/dump.c +++ b/libavformat/dump.c @@ -584,42 +584,7 @@ static void dump_stream_format(AVWriter wr, print_fps(wr, 1 / av_q2d(st->time_base), "tbn"); } - if (st->disposition & AV_DISPOSITION_DEFAULT) - av_writer_printf(wr, " (default)"); - if (st->disposition & AV_DISPOSITION_DUB) - av_writer_printf(wr, " (dub)"); - if (st->disposition & AV_DISPOSITION_ORIGINAL) - av_writer_printf(wr, " (original)"); - if (st->disposition & AV_DISPOSITION_COMMENT) - av_writer_printf(wr, " (comment)"); - if (st->disposition & AV_DISPOSITION_LYRICS) - av_writer_printf(wr, " (lyrics)"); - if (st->disposition & AV_DISPOSITION_KARAOKE) - av_writer_printf(wr, " (karaoke)"); - if (st->disposition & AV_DISPOSITION_FORCED) - av_writer_printf(wr, " (forced)"); - if (st->disposition & AV_DISPOSITION_HEARING_IMPAIRED) - av_writer_printf(wr, " (hearing impaired)"); - if (st->disposition & AV_DISPOSITION_VISUAL_IMPAIRED) - av_writer_printf(wr, " (visual impaired)"); - if (st->disposition & AV_DISPOSITION_CLEAN_EFFECTS) - av_writer_printf(wr, " (clean effects)"); - if (st->disposition & AV_DISPOSITION_ATTACHED_PIC) - av_writer_printf(wr, " (attached pic)"); - if (st->disposition & AV_DISPOSITION_TIMED_THUMBNAILS) - av_writer_printf(wr, " (timed thumbnails)"); - if (st->disposition & AV_DISPOSITION_CAPTIONS) - av_writer_printf(wr, " (captions)"); - if (st->disposition & AV_DISPOSITION_DESCRIPTIONS) - av_writer_printf(wr, " (descriptions)"); - if (st->disposition & AV_DISPOSITION_METADATA) - av_writer_printf(wr, " (metadata)"); - if (st->disposition & AV_DISPOSITION_DEPENDENT) - av_writer_printf(wr, " (dependent)"); - if (st->disposition & AV_DISPOSITION_STILL_IMAGE) - av_writer_printf(wr, " (still image)"); - if (st->disposition & AV_DISPOSITION_NON_DIEGETIC) - av_writer_printf(wr, " (non-diegetic)"); + av_disposition_write(wr, st->disposition, " (", ")", NULL, 0); av_writer_printf(wr, "\n"); dump_metadata(wr, st->metadata, " "); -- 2.39.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".