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 24347453BD for ; Mon, 28 Aug 2023 12:37:52 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C9B5A68C6A9; Mon, 28 Aug 2023 15:36:57 +0300 (EEST) Received: from mail-ot1-f43.google.com (mail-ot1-f43.google.com [209.85.210.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0DF5068C680 for ; Mon, 28 Aug 2023 15:36:51 +0300 (EEST) Received: by mail-ot1-f43.google.com with SMTP id 46e09a7af769-6bca5d6dcedso2489840a34.1 for ; Mon, 28 Aug 2023 05:36:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693226209; x=1693831009; 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=K2arKltEJcJXOJeGD93nLfC8jaH9HdmIjnYIfZ2doEU=; b=sI5iLNBcqeVvFt+BqKIKtMDMxsD/GFmREavtzmxKEgIvSLUUSXqNOqP/hVU+d+lF43 8O7YsmIHM3fI7h6brahrfcU578JnzT3dx1RUAzA4goiGrOVNz8T4XvoM1NyL9pNRhTHU CCDqOhGcuutdb6N1yZy0DiZN+oV7KPjKfOPcZAn1EvKnKYFXh4X/4Z6yWOyGqwF08SHZ OosFRt0Az7QgnsNSzOpvZaJFI6CMzFJi3J+2KAjSEZP6fTO7i49tAV+1t35hNEthmGQd 5FA2ihXpBCxTL7mWkpZUxlaiT001bdZySTx7yrKpolkj0GwNxs+7tniPUOKr953HLpAH rpyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693226209; x=1693831009; 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=K2arKltEJcJXOJeGD93nLfC8jaH9HdmIjnYIfZ2doEU=; b=kkxggOvxMNLSH69tGAneJv0k55NxvCqZAoUp5s1+Ds0IBBKUhfhmx9GXgQ25QuQEGD y9/8zhtC6sU3e9WHTXkgVreWBWKWg/a4y4ZlNF9L6xTFlrXGCbcEeetIH7Y4jh49xWko L/zGgYVEOy67b7xj2RzwyTaLGdxoveLOmrPIzdDartvOnI+OW5OmNTsPw9d5WgiYqAr5 jj2aQCzEotLFbO+efqjxMq6suLgmaZirZ47JE88dvwExkzxBEP5iGzpTTHsvB+OcgRtR dXx1j/xyAv8D/Dj/PHyBXTwrZjPOMDAQr7tB378SARXr7UgpB8yHEOppwXCJzxT7KANF X02A== X-Gm-Message-State: AOJu0YwaR7m/CVO1NCgYTxOY9lJsO9Pj594H8x6K3eMz4KDBbO5/Ul4q pntFc+Y1F7pdIOBpeBaQCmaqMNRdGZg= X-Google-Smtp-Source: AGHT+IE4YxwbFoTi373k/UCoRLpD5NcVa5ah4orw/yDPb2ZKRWtj8jf+deMcon2u9K0N4Op9WBTyLQ== X-Received: by 2002:a9d:73cc:0:b0:6b9:1917:b2f3 with SMTP id m12-20020a9d73cc000000b006b91917b2f3mr14285405otk.33.1693226209328; Mon, 28 Aug 2023 05:36:49 -0700 (PDT) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id b15-20020a056830104f00b006b9a98b9659sm3404615otp.19.2023.08.28.05.36.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Aug 2023 05:36:48 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Mon, 28 Aug 2023 09:34:58 -0300 Message-ID: <20230828123617.57535-7-jamrial@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230828123617.57535-1-jamrial@gmail.com> References: <20230828123617.57535-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 06/12] 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.41.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".