From patchwork Mon May 3 13:32:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 27571 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a10:399:0:0:0:0 with SMTP id 25csp257654pxh; Mon, 3 May 2021 06:33:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygUTxd5Mc5f4R5PkT3jQXHrAc8Ua5rDmnYhv/C96GutvJPvi/64mLw4J1UVC7ORV6qEEfW X-Received: by 2002:a50:fe05:: with SMTP id f5mr3999950edt.288.1620048791637; Mon, 03 May 2021 06:33:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620048791; cv=none; d=google.com; s=arc-20160816; b=RXyXSmiti6SeiWPl7/Qko72zy/K40a0oB/F3Us2JvluY0uRjfM6APrtujMLxtlVz1m S8yT2+oqN3zGoPjJx5PKzrfKYev11QcFdG1ztWM1MX4J1sWRN+C/sq5O3LjvphR0DaWx Kl75XKn0tWUxBSaZW6x/2sdOvWrDKoZ0hKBc+0GkCHxcU98IgfDfn5Gf/P7ywawEwayu vmYtTqJFI/AxbNF8b2qp41XCm5VrDKUGixEj2FvDmaEbrct0QTePRfxlyh15Ha8MIkZi tmsZAHGh4zUB8dIY8G6yed/v8NMw1EEN9TUm/XCW9vKoZI7FlnztvDCqpRP38RQpNiMF 4XRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=feFSSy5r+4JArE8CXj0Joc4lULNvKwPuYawobH8HG5c=; b=dCL1q4aEbTLtGXj64DO59oBDya4F4qIIIa5k4bcaTiSuHDKCuQBLoyRYqft+YZ2aX5 QpnfieeJOVLob+3uYRym7M1YBxqTvN0fPinI5ZkxQfTBFAzoSbZ45cQo50Ij1N11QoU0 HoExm1OoDyUwpfEW/00Od6r8PO+YLjvwSKOdg2DMWAMIkNIDt9Tc38WH70d5MzzpOFJo Z0T6cAOGavKnZurPxSzUK5mMiZuV7DqjRX5zq9U62bn7vXknaUhhLUK/IeAl6gWPX4yQ JdjO2QOLcA3P20VRwqfrHDZeGjDKQ+Tw+tbN7WUym0M7zm1PyC5dlzDakzMbHeHf4luj c1WA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="eb/2FVgs"; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id j17si9914495edy.46.2021.05.03.06.33.11; Mon, 03 May 2021 06:33:11 -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; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="eb/2FVgs"; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D320368825A; Mon, 3 May 2021 16:32:36 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qv1-f43.google.com (mail-qv1-f43.google.com [209.85.219.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2DC65688081 for ; Mon, 3 May 2021 16:32:28 +0300 (EEST) Received: by mail-qv1-f43.google.com with SMTP id jm10so2521569qvb.5 for ; Mon, 03 May 2021 06:32:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=cuczxEbbAArQ8RIDvCXjF9ziZwHjPoIjTv7aiteavH0=; b=eb/2FVgsWbTZg8vQgHVeR27ZVMPGcBkxnyo2w9DAfdOynln/ViS8IyK/Rcb+Cq06li n3YTW3e/ryIswgT7jV9edITCCNU9uLm0HBdPWU1OisCeAapgQ4lYR9knWTkrBw2SsJ6X k3WiFhezOgwVlUOPxisip7tCOiJJBeq99rrp2RPrM6YD2my+MY4GZD4X6wlQBWo/2fZQ +6RlXvxXw3saGGUCY84wtFWVUGOiVPypP1H9rk3KqT/ZzsNcZr3NecT/QFbTowhqINCd or/IbrY/ET9zCZkdQaYbgseL6YikHBs3M2iFiIRkWXYFqDwcLvIdoM/LAttyFeHIUzDH kBnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cuczxEbbAArQ8RIDvCXjF9ziZwHjPoIjTv7aiteavH0=; b=j11snyB1FdIj2OoXW9paGYx+74SPhXyWwosHWrkDRvGGi7mHfhxiIftMXZE2Zjev21 f8+674wl4owFliVp26q1MpxTEl7j126sSJ590sb/qCKHrjcewEz9/Gf8Zyz4nr+Chtpi Sa404NVDlj+ibP1XfpuEyzE94zzsdk75YvATf+iVId/NhsyDxK0TM3OMKPpu4jk+3wky A8R5ZZIGrIYQRcOFFks76ccHrOe3yzwEtiBZuBAAOumUuxd//sPTLXyHW9bIss/GWOne LeuX3CfbJrpBgdv9pJ72v+aDVD0MbSXPFPcidpvjmf0SoUEumficYFJ05AXPWrYYMDbX sjyg== X-Gm-Message-State: AOAM532TdB8gkY5ezdQT24ae9uhMqWY63N+SNh+e8WuuFcRmgAnUOoee zw8iVzF3KqcLE8ApebOrcB8wj33YFXI= X-Received: by 2002:a0c:c590:: with SMTP id a16mr19315782qvj.30.1620048746699; Mon, 03 May 2021 06:32:26 -0700 (PDT) Received: from localhost.localdomain ([191.83.208.172]) by smtp.gmail.com with ESMTPSA id 189sm5751929qkh.99.2021.05.03.06.32.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 May 2021 06:32:26 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 3 May 2021 10:32:00 -0300 Message-Id: <20210503133200.1434-5-jamrial@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210503133200.1434-1-jamrial@gmail.com> References: <20210503133200.1434-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 5/5] avformat: move AVStream.stream_identifier to AVStreamInternal 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: HvtnHBk8Y+Kw It's a private field, no reason to have it exposed in a public header. Signed-off-by: James Almer --- libavformat/avformat.h | 7 ------- libavformat/internal.h | 7 +++++++ libavformat/mpegts.c | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index ecf76b4bfc..d62c3f8744 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1003,13 +1003,6 @@ typedef struct AVStream { int64_t first_dts; int64_t cur_dts; - /** - * Stream Identifier - * This is the MPEG-TS stream identifier +1 - * 0 means unknown - */ - int stream_identifier; - /** * An opaque field for libavformat internal usage. * Must not be accessed in any way by callers. diff --git a/libavformat/internal.h b/libavformat/internal.h index 94115960ea..d9423635d2 100644 --- a/libavformat/internal.h +++ b/libavformat/internal.h @@ -382,6 +382,13 @@ struct AVStreamInternal { * Number of frames that have been demuxed during avformat_find_stream_info() */ int codec_info_nb_frames; + + /** + * Stream Identifier + * This is the MPEG-TS stream identifier +1 + * 0 means unknown + */ + int stream_identifier; }; #ifdef __GNUC__ diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index fb454b9fd3..a02965bacf 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1995,7 +1995,7 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type } break; case 0x52: /* stream identifier descriptor */ - st->stream_identifier = 1 + get8(pp, desc_end); + st->internal->stream_identifier = 1 + get8(pp, desc_end); break; case METADATA_DESCRIPTOR: if (get16(pp, desc_end) == 0xFFFF) @@ -2114,7 +2114,7 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type // Listing of data_component_ids is in STD-B10, part 2, Annex J. // Component tag limits are documented in TR-B14, fascicle 2, // Vol. 3, Section 2, 4.2.8.1 - int actual_component_tag = st->stream_identifier - 1; + int actual_component_tag = st->internal->stream_identifier - 1; int picked_profile = FF_PROFILE_UNKNOWN; int data_component_id = get16(pp, desc_end); if (data_component_id < 0)