From patchwork Mon Oct 28 03:29:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Zhao X-Patchwork-Id: 16002 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 3A28044847D for ; Mon, 28 Oct 2019 05:36:23 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0DDD368AA7B; Mon, 28 Oct 2019 05:36:23 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9F9966880EC for ; Mon, 28 Oct 2019 05:36:16 +0200 (EET) Received: by mail-pl1-f194.google.com with SMTP id t12so251232plo.6 for ; Sun, 27 Oct 2019 20:36:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=nqTzDf+V2oYBzM25qjY1NgtQ/tOhOoBDQR9Jsc4Suyc=; b=BdKvNug6AgPjZt6nq1OHrbeg7YcQmC2hCLC4ydKxHRTRAPfvUWcAzDK0Ko9BUBAIGi DzIuwyV3/ZhDX1+YU0LZxL9WDA47H6kCblkdyrKMoO2RvECJ08nlOXbPcfbZDadc8Lu+ Rnc/UqWM1w4eIoMKFbTr8N7bVm+WsnGf7tZEzcye9GSUHjYsiKkw5KDnYV7vgllY8aG4 Ay9i73d5FF8+KbKzSVJEjNI+YoaWx02J3GklHBs5JBOGZ/wAaoOgYt7vl0itpal9b8oK 8AokSQRV9JxbDWDjQz1e2eJf6Tw7uc/DHeBxDdaJLFlABEEVcklVmTCf6zcSHoM5FZTO AwJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=nqTzDf+V2oYBzM25qjY1NgtQ/tOhOoBDQR9Jsc4Suyc=; b=DDup5NZFL1gFHNbZ1KxGtCo8b74LLRmxK8Pp3nlwh/XTmRlK6U69/gGgA+SW4d+haJ NplYGCg7DahHoujfhAEHlth3WejO/x3wQLl8mboFt2K/kafNUpHmM7QMJNF3bkyL3IqI m0MeiuD93KEX3u9nKNPCXnodiJ7oUGzZBIQyfvurRbb5d1dXtpH78XLDZd8STkI8beUZ 77pYPvfkBZN4VWAjcu8je+yYwLkkAd54mWPaiyMvbSjImjhn2suINrmREajcK75Pz7uX HO23vKkcZ97DwjJ678qejDCDs0z0u2wjRAEQgdLhLh3IOPBwTkVkukaMBFIGHbszCwvF pp+Q== X-Gm-Message-State: APjAAAUPb5i0w5k1bwS/5QaZlVtmYPPYte76IS/Dkb45wpKgmdkVJ0J+ A6W+LKUVrCji4LRqwSwjD7eb2h5J X-Google-Smtp-Source: APXvYqy7xyqcHNG9NVB98zFoEacMdjlR3f7V7QiF+pn8xGR13smmaHBf7cBGKiBWgFMpU6zfNpnovQ== X-Received: by 2002:a17:902:8d98:: with SMTP id v24mr16696413plo.265.1572233368393; Sun, 27 Oct 2019 20:29:28 -0700 (PDT) Received: from localhost.localdomain ([47.90.47.25]) by smtp.gmail.com with ESMTPSA id 13sm9860533pgm.76.2019.10.27.20.29.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 27 Oct 2019 20:29:27 -0700 (PDT) From: Jun Zhao To: ffmpeg-devel@ffmpeg.org Date: Mon, 28 Oct 2019 11:29:23 +0800 Message-Id: <1572233364-9809-1-git-send-email-mypopydev@gmail.com> X-Mailer: git-send-email 1.7.1 Subject: [FFmpeg-devel] [PATCH V1 1/2] lavf/hls: fix the log context setting in log message 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: Jun Zhao MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Jun Zhao Fix the log context setting in log message Signed-off-by: Jun Zhao --- libavformat/hls.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libavformat/hls.c b/libavformat/hls.c index d7f4d5b..6939969 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -476,20 +476,20 @@ static struct rendition *new_rendition(HLSContext *c, struct rendition_info *inf return NULL; if (type == AVMEDIA_TYPE_UNKNOWN) { - av_log(c, AV_LOG_WARNING, "Can't support the type: %s\n", info->type); + av_log(c->ctx, AV_LOG_WARNING, "Can't support the type: %s\n", info->type); return NULL; } /* URI is mandatory for subtitles as per spec */ if (type == AVMEDIA_TYPE_SUBTITLE && !info->uri[0]) { - av_log(c, AV_LOG_ERROR, "The URI tag is REQUIRED for subtitle.\n"); + av_log(c->ctx, AV_LOG_ERROR, "The URI tag is REQUIRED for subtitle.\n"); return NULL; } /* TODO: handle subtitles (each segment has to parsed separately) */ if (c->ctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) if (type == AVMEDIA_TYPE_SUBTITLE) { - av_log(c, AV_LOG_WARNING, "Can't support the subtitle(uri: %s)\n", info->uri); + av_log(c->ctx, AV_LOG_WARNING, "Can't support the subtitle(uri: %s)\n", info->uri); return NULL; } @@ -1067,7 +1067,7 @@ static void handle_id3(AVIOContext *pb, struct playlist *pls) } else { if (!pls->id3_changed && id3_has_changed_values(pls, metadata, apic)) { - avpriv_report_missing_feature(pls->ctx, "Changing ID3 metadata in HLS audio elementary stream"); + avpriv_report_missing_feature(pls->parent, "Changing ID3 metadata in HLS audio elementary stream"); pls->id3_changed = 1; } av_dict_free(&metadata); @@ -1118,7 +1118,7 @@ static void intercept_id3(struct playlist *pls, uint8_t *buf, int remaining = taglen - tag_got_bytes; if (taglen > maxsize) { - av_log(pls->ctx, AV_LOG_ERROR, "Too large HLS ID3 tag (%d > %"PRId64" bytes)\n", + av_log(pls->parent, AV_LOG_ERROR, "Too large HLS ID3 tag (%d > %"PRId64" bytes)\n", taglen, maxsize); break; } @@ -1139,14 +1139,14 @@ static void intercept_id3(struct playlist *pls, uint8_t *buf, /* strip the intercepted bytes */ *len -= tag_got_bytes; memmove(buf, buf + tag_got_bytes, *len); - av_log(pls->ctx, AV_LOG_DEBUG, "Stripped %d HLS ID3 bytes\n", tag_got_bytes); + av_log(pls->parent, AV_LOG_DEBUG, "Stripped %d HLS ID3 bytes\n", tag_got_bytes); if (remaining > 0) { /* read the rest of the tag in */ if (read_from_url(pls, seg, pls->id3_buf + id3_buf_pos, remaining) != remaining) break; id3_buf_pos += remaining; - av_log(pls->ctx, AV_LOG_DEBUG, "Stripped additional %d HLS ID3 bytes\n", remaining); + av_log(pls->parent, AV_LOG_DEBUG, "Stripped additional %d HLS ID3 bytes\n", remaining); } } else {