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 10B75472CD for ; Mon, 4 Sep 2023 15:05:39 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 61B2E68C7D4; Mon, 4 Sep 2023 18:04:37 +0300 (EEST) Received: from mail-oi1-f170.google.com (mail-oi1-f170.google.com [209.85.167.170]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 85B0D68C7C6 for ; Mon, 4 Sep 2023 18:04:28 +0300 (EEST) Received: by mail-oi1-f170.google.com with SMTP id 5614622812f47-3a85c5854deso1131139b6e.0 for ; Mon, 04 Sep 2023 08:04:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693839867; x=1694444667; 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=nnH766O87AYvF0zQ6XpaREF3kePI/f8o0hT5bys0xeuJ2TD+DjDn6N8gRXHsm5H2Pw AV8/44kepM3W4Bibta6CDtvD7aBJd8yyVMUVcxxV0dTpvt004JDm3YV3dSUpvTcH9U6w kWBurRRlc++YTk2Og6Vw7RYETLIofAMMADc2XNZTv5NVbmwp0w83BN6Muzc7aWxwOpMJ hu7+hz1toHPnQVdBZzhttLmemlS/1EkoIb89KCwbVc1UyTuaka9qtGkyLXrlnvnDII/5 pZjCGzrmhY5mpD2qYIfWCT8Z0vZ30b1RGDTLXo+Jo81vGLv+RqntWFo0dLMpzzOFRJ2M y2oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693839867; x=1694444667; 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=ZhtWSuPEzwhK/3XkRJr0j7XzeE+zGs5+lms50F7Z5u9Ww2IVQGkVNQaHsIpIsyCHbc tYLBNkhNven+9gqsN/u26zjzp7Lm49xuWe24T+EHb9kw3I+76mU/FaGs0ke95AwXfQWe hWV7Sumn77AlJcFtsekk4rtGKHZKa9+y0U23uyMfYK5NmxdtEnLVy4kWDd2xFJJqRMeE KmU567sEHJYSWd6C20pfxWbHQx8kObDwSfyIauTkDspGTFes95bkvrKfNTJOOr7DRGcY LMuGSXtnzEgXwtpMlKmD+fMYzgBQfvzYBG0O6c0WcY2YnqjsU5e3XC7hrR8+UqLHDMeT LBWw== X-Gm-Message-State: AOJu0YwbN3ArnwajOBq7aHP/zQjOk7ZBO2fuvUTvPXrvrPI4RftlkwAk p8a2cSm3sSNo+mJm7Lo6+Zecl9Fh0P4= X-Google-Smtp-Source: AGHT+IGQV62EOhU2IoYtMPwfHSRFqB//jhOGyV3IvsnjoVqtXrJceBm6x0gbIiMhRg1dh+isFldBWw== X-Received: by 2002:a05:6808:1816:b0:3a7:45e0:c0eb with SMTP id bh22-20020a056808181600b003a745e0c0ebmr13131179oib.24.1693839866786; Mon, 04 Sep 2023 08:04:26 -0700 (PDT) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id z14-20020a54458e000000b003a9cd23980esm4946286oib.8.2023.09.04.08.04.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Sep 2023 08:04:26 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 4 Sep 2023 12:03:59 -0300 Message-ID: <20230904150411.56777-7-jamrial@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230904150411.56777-1-jamrial@gmail.com> References: <20230904150411.56777-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 06/17] 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".