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 EB3DE473FA for ; Wed, 6 Sep 2023 17:46:07 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5709668C88D; Wed, 6 Sep 2023 20:45:01 +0300 (EEST) Received: from mail-ot1-f54.google.com (mail-ot1-f54.google.com [209.85.210.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5708A68C873 for ; Wed, 6 Sep 2023 20:44:53 +0300 (EEST) Received: by mail-ot1-f54.google.com with SMTP id 46e09a7af769-6bee392fe9dso99044a34.1 for ; Wed, 06 Sep 2023 10:44:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694022291; x=1694627091; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=6XApgb7W1zkV4M384GlsA/cgw/2zWxqizldmPcjBp7M=; b=dcEAwUN4c6QtPvDsW/WuZzXARFqRkgSG3/iF8G3y0MCz+pYGRU0uBfi111L2TJvksZ BkYwuCcHD98VwyZWbeB/+H36PgctBQeB9gnj61rf0PPXbrCpTDtgbBfgJrb1BMJ/luUg Masb+FFjXEIS8bwDz2vbZHvHv96rgqBE1zVjxvb4xpkvRkDizdcPm8N6VkHdxZF3h4Kc pN+27BkGhlHxC7j0BH/O9+9YW553Qh+WCE1lDf/kZGXi9g6KEJd2Y4hti+YyVwXoyswg v0e38CgkkQIyKFfQR8aLT6V560HrroP5TKYpBGuRtfrbXcIZQ/Z0xmbRKyNxBHD+CafQ +DrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694022291; x=1694627091; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6XApgb7W1zkV4M384GlsA/cgw/2zWxqizldmPcjBp7M=; b=Z97FeHyV+OSa2Hq8BePT23VrSD4f1OGRHlooVUs5r8BhHPDZpD6fLMY44fudAebo7B jNELY7QgtaQNx0oHlJ/O7Nyqr6vbVHox60ls2UaYsVYCAMZeWjPlcUn9G4uztK4z4RWH Bpego6ZR/n19MUpHZkqEFLOLNFnkdP7KF4N1jIw4txMYD+xlbD3uvOhMkU9lzhUwzMG9 ZfLt0L/rRb350Ha04MqlDAZtHTWR4f4paZvmevDOR8duA7UbwOPitC/xXEj2/yj0zpnY kFl5b6RRi4JlSCSIQKQ6pEICaZAZrlP7Qz5YPl8PcgATyuIABPmz/WvBzEXfZDhCEE6y 9Fmw== X-Gm-Message-State: AOJu0YxyKmufscAhRzNFiS/t6BnM3nnti4X64PeGU6R1tF/vde881Ym4 bhtS4i7XaRPqijZpcXO5+S1fDxb1hUc= X-Google-Smtp-Source: AGHT+IFmxWSTvvkFHhxkyGGof/23Ny1KzJCai5Sbg4i3VXQOyLDLXU2QWUOWnU33iX7CY5vpgq+OxQ== X-Received: by 2002:a05:6830:20c8:b0:6bd:d1fc:2f2f with SMTP id z8-20020a05683020c800b006bdd1fc2f2fmr19558460otq.21.1694022291674; Wed, 06 Sep 2023 10:44:51 -0700 (PDT) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id v5-20020a0568301bc500b006b99f66444bsm6561309ota.71.2023.09.06.10.44.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Sep 2023 10:44:51 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 6 Sep 2023 14:44:26 -0300 Message-ID: <20230906174431.45558-7-jamrial@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230906174431.45558-1-jamrial@gmail.com> References: <20230906174431.45558-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 06/10] fftools/ffprobe: stop using AVStream.side_data 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: Signed-off-by: James Almer --- fftools/ffprobe.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 4fcfe1164b..28ccb45b26 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -2279,16 +2279,9 @@ static void print_ambient_viewing_environment(WriterContext *w, static void print_pkt_side_data(WriterContext *w, AVCodecParameters *par, - const AVPacketSideData *side_data, - int nb_side_data, - SectionID id_data_list, + const AVPacketSideData *sd, SectionID id_data) { - int i; - - writer_print_section_header(w, id_data_list); - for (i = 0; i < nb_side_data; i++) { - const AVPacketSideData *sd = &side_data[i]; const char *name = av_packet_side_data_name(sd->type); writer_print_section_header(w, id_data); @@ -2382,9 +2375,6 @@ static void print_pkt_side_data(WriterContext *w, } else if (sd->type == AV_PKT_DATA_AFD && sd->size > 0) { print_int("active_format", *sd->data); } - writer_print_section_footer(w); - } - writer_print_section_footer(w); } static void print_private_data(WriterContext *w, void *priv_data) @@ -2544,9 +2534,13 @@ static void show_packet(WriterContext *w, InputFile *ifile, AVPacket *pkt, int p av_dict_free(&dict); } - print_pkt_side_data(w, st->codecpar, pkt->side_data, pkt->side_data_elems, - SECTION_ID_PACKET_SIDE_DATA_LIST, + writer_print_section_header(w, SECTION_ID_PACKET_SIDE_DATA_LIST); + for (int i = 0; i < pkt->side_data_elems; i++) { + print_pkt_side_data(w, st->codecpar, &pkt->side_data[i], SECTION_ID_PACKET_SIDE_DATA); + writer_print_section_footer(w); + } + writer_print_section_footer(w); } writer_print_section_footer(w); @@ -3188,10 +3182,14 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id if (do_show_stream_tags) ret = show_tags(w, stream->metadata, in_program ? SECTION_ID_PROGRAM_STREAM_TAGS : SECTION_ID_STREAM_TAGS); - if (stream->nb_side_data) { - print_pkt_side_data(w, stream->codecpar, stream->side_data, stream->nb_side_data, - SECTION_ID_STREAM_SIDE_DATA_LIST, + if (stream->codecpar->side_data.nb_sd) { + writer_print_section_header(w, SECTION_ID_STREAM_SIDE_DATA_LIST); + for (int i = 0; i < stream->codecpar->side_data.nb_sd; i++) { + print_pkt_side_data(w, stream->codecpar, stream->codecpar->side_data.sd[i], SECTION_ID_STREAM_SIDE_DATA); + writer_print_section_footer(w); + } + writer_print_section_footer(w); } writer_print_section_footer(w); -- 2.42.0 _______________________________________________ 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".