From patchwork Mon Sep 30 07:17:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Steven X-Patchwork-Id: 15405 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 0FCAC4483F4 for ; Mon, 30 Sep 2019 10:18:43 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E98D1689AA0; Mon, 30 Sep 2019 10:18:42 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from smtpbgsg2.qq.com (smtpbgsg2.qq.com [54.254.200.128]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E87EA68834B for ; Mon, 30 Sep 2019 10:18:40 +0300 (EEST) X-QQ-mid: bizesmtp21t1569827885tb03jfm1 Received: from localhost (unknown [47.90.47.25]) by esmtp6.qq.com (ESMTP) with id ; Mon, 30 Sep 2019 15:18:05 +0800 (CST) X-QQ-SSF: 01100000002000K0ZQF1B00A0000000 X-QQ-FEAT: wcF9YfW2FxJPa7e4t9DuWLHpIDIDqmg/KVeiM+OLhHwAMVmi/0Vq/gHxbgk1G fy1B2Qb1UcbEGuS0oRQd0rZt0AfIs/TLdMPFLbMMk01A9u0vQvyKq3n2b0cfhCXbouZVb0h XFVso2f2BUjpvKtTVnegu3L7zC2JhAnujxENcJzHZeOq+SBiZlddSRmkgwPTxsl67/G4GIn XGfA3TDs0jSz8ukjhSfS2/ZFWwuK5/scA518x01r7OsE+oGpleIIT6RVpzGpuvEWutMvWFf 1XJLWijsbQgRxZ7kNp1Qq7WM1OuJr0TzGMbDYTHGSSKOEeCjmywEirnw4= X-QQ-GoodBg: 0 From: Steven Liu To: ffmpeg-devel@ffmpeg.org Date: Mon, 30 Sep 2019 15:17:41 +0800 Message-Id: <20190930071751.5919-4-lq@chinaffmpeg.org> X-Mailer: git-send-email 2.10.1.382.ga23ca1b.dirty In-Reply-To: <20190930071751.5919-1-lq@chinaffmpeg.org> References: <20190930071751.5919-1-lq@chinaffmpeg.org> X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:chinaffmpeg.org:qybgforeign:qybgforeign4 X-QQ-Bgrelay: 1 Subject: [FFmpeg-devel] [PATCH v1 04/14] avformat/avidec: add logging context to log 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: Steven Liu MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Steven Liu --- libavformat/avidec.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavformat/avidec.c b/libavformat/avidec.c index e3cd844169..a492b3d037 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -117,7 +117,7 @@ static const AVMetadataConv avi_metadata_conv[] = { static int avi_load_index(AVFormatContext *s); static int guess_ni_flag(AVFormatContext *s); -#define print_tag(str, tag, size) \ +#define print_tag(s, str, tag, size) \ av_log(NULL, AV_LOG_TRACE, "pos:%"PRIX64" %s: tag=%s size=0x%x\n", \ avio_tell(pb), str, av_fourcc2str(tag), size) \ @@ -504,7 +504,7 @@ static int avi_read_header(AVFormatContext *s) tag = avio_rl32(pb); size = avio_rl32(pb); - print_tag("tag", tag, size); + print_tag(s, "tag", tag, size); switch (tag) { case MKTAG('L', 'I', 'S', 'T'): @@ -512,7 +512,7 @@ static int avi_read_header(AVFormatContext *s) /* Ignored, except at start of video packets. */ tag1 = avio_rl32(pb); - print_tag("list", tag1, 0); + print_tag(s, "list", tag1, 0); if (tag1 == MKTAG('m', 'o', 'v', 'i')) { avi->movi_list = avio_tell(pb) - 4; @@ -520,7 +520,7 @@ static int avi_read_header(AVFormatContext *s) avi->movi_end = avi->movi_list + size + (size & 1); else avi->movi_end = avi->fsize; - av_log(NULL, AV_LOG_TRACE, "movi end=%"PRIx64"\n", avi->movi_end); + av_log(s, AV_LOG_TRACE, "movi end=%"PRIx64"\n", avi->movi_end); goto end_of_header; } else if (tag1 == MKTAG('I', 'N', 'F', 'O')) ff_read_riff_info(s, size - 4); @@ -584,7 +584,7 @@ static int avi_read_header(AVFormatContext *s) tag1 = stream_index ? MKTAG('a', 'u', 'd', 's') : MKTAG('v', 'i', 'd', 's'); - print_tag("strh", tag1, -1); + print_tag(s, "strh", tag1, -1); if (tag1 == MKTAG('i', 'a', 'v', 's') || tag1 == MKTAG('i', 'v', 'a', 's')) { @@ -802,7 +802,7 @@ FF_ENABLE_DEPRECATION_WARNINGS ast->has_pal = 1; } - print_tag("video", tag1, 0); + print_tag(s, "video", tag1, 0); st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; st->codecpar->codec_tag = tag1;