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 180D247920 for ; Wed, 27 Sep 2023 13:14:40 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DC8DC68CB35; Wed, 27 Sep 2023 16:13:23 +0300 (EEST) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0A61668CB24 for ; Wed, 27 Sep 2023 16:13:14 +0300 (EEST) Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-690d2e13074so8707242b3a.1 for ; Wed, 27 Sep 2023 06:13:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695820392; x=1696425192; 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=jXlKwpo+7SDG7P78vtuKpoqsqHN4oDNexQOX8085AcE=; b=Si1l/lzqPRbWd4ld9t2G8zdi8QEH2ojlQ6I5doe0inF4EP/G5v8i8WXwiO09D5GxUn h+xJeCmLWw3veHoqN7u/RDwHxwdOuVGY5LrD2gI/5L3WsurakwAKtkQ2PepAkIK+C0HY Y0VXkHDxv09P0RJHMFXNFclAiZk+G4lAzGn4TLAIYWYyMJhKo3krT1iUfP2JgnPvbQdu ir0bTeXbFggtrjXYF8apilqX4XkKGXJFLEJJuy5wh8ZlVYBks+8R/4zZK0FeBlP8eZUx q7d8zM3QI/iklrn7/0OBtfEBgCAX8uubhLEBJhw+PbyTNMVfXmjphpA8CJR1K55z+ZT6 h/CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695820392; x=1696425192; 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=jXlKwpo+7SDG7P78vtuKpoqsqHN4oDNexQOX8085AcE=; b=hZFNsWnfy9i490+wHEvF4BeZprPILpfTHbGY/Qj9xgVz5imJqs34UnhWxq9VWlMclP 0c/om3n36G2LWB4OXtEIcqCg+9laZc5adE5SzsqT4hRnkiGnbcWH3IImM3NJXMqt99Q4 T4kpbFeJa1PWupmMZHdGciq4e7AOCUAKS/BfL8+TZLSn1xdH03qagMz4lz4YW7M32rjT TflZj0kHb8T8cQcILCdch2096n2iyaKUkfe+/wMvuo6JJnIA8jo9uo4m82YNNOfLYvyQ J1FOdtZemlCTPHjUD93BM96YIA5M9NH+AhunXFa0v9mKIuG9rmwfpxqvVP9Cm2FNE/+E 3viA== X-Gm-Message-State: AOJu0YybW4tx2jIObPAkNQVclngiAHd4JN/tlqB4fso5XtzjIsA2Rdak R0BDIWfsVxkp1EudwgHjLZeKchWxYm0= X-Google-Smtp-Source: AGHT+IF4TTnXUVzXpetyasNGTOxNIF/78BxYfG9OMk9qwl2IqKFkXj2HHr1DRuM7GiQhgSgkmlXQXw== X-Received: by 2002:a05:6a21:3d8a:b0:12e:98a3:77b7 with SMTP id bj10-20020a056a213d8a00b0012e98a377b7mr1758814pzc.59.1695820391939; Wed, 27 Sep 2023 06:13:11 -0700 (PDT) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id v10-20020a1709029a0a00b001b53953f306sm13050600plp.178.2023.09.27.06.13.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 06:13:11 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 27 Sep 2023 10:12:38 -0300 Message-ID: <20230927131242.1950-8-jamrial@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230927131242.1950-1-jamrial@gmail.com> References: <20230927131242.1950-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 07/11] 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 c20f464623..d5415be61a 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->nb_side_data) { + writer_print_section_header(w, SECTION_ID_STREAM_SIDE_DATA_LIST); + for (int i = 0; i < stream->codecpar->nb_side_data; i++) { + print_pkt_side_data(w, stream->codecpar, &stream->codecpar->side_data[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".