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 D9D1742C5B for ; Thu, 2 Jun 2022 00:31:44 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EDDD168B7E2; Thu, 2 Jun 2022 03:31:04 +0300 (EEST) Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 390D968B7B9 for ; Thu, 2 Jun 2022 03:30:59 +0300 (EEST) Received: by mail-pl1-f180.google.com with SMTP id s14so3179274plk.8 for ; Wed, 01 Jun 2022 17:30:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=unZSWE+dzJYc0z/tPuP/nXrJrd/oMKbTb0kbc98ykQM=; b=x6KfVYGBDm2sqeXvxle6ibb24IR/0hXv4CFkBGhoeRcGZq65B9HR4NhxXX/k+WQmY7 GVh3c/SupPliMbnrsqDnxBNGp8LhvXOd06fw1e05xBc6sKVWk0m9Rt0bxsLtQEgjgKZs 9m2UftTQRO81aiNRIi2eMLNPjxllnbM6v9qzvQS61oFBSKddFQie7K+X+igezUH+iJwz gmCXEGKKL5inXOJvRfC4WtHhFnxcjwI3PPD2EdDB/aZBzFAi6IN3MIALWidVCQSeDGQA +So+euAgEg078ButI1H0oJ4bap9o+0wujtcukUmsZVDMQmVMunGb8vXd/t9erVjt44/2 IuvA== X-Gm-Message-State: AOAM533G2kmTFGhFoW+mma6h7Hy9wYh0VLzoUMzauivxC4NidqO333hc 1lhQEMQ1koXYrr0iSjnvNkRFkCUp+YQ= X-Google-Smtp-Source: ABdhPJwnUForwSnEMOJE0uVZUnB6LbaWjIUvK7IR/XL+DQsLypTAhwPh+Z50am9P1EpXvyr3ETAG4Q== X-Received: by 2002:a17:902:7594:b0:15e:bbac:8d49 with SMTP id j20-20020a170902759400b0015ebbac8d49mr2051713pll.124.1654129857094; Wed, 01 Jun 2022 17:30:57 -0700 (PDT) Received: from localhost (76-14-89-2.sf-cable.astound.net. [76.14.89.2]) by smtp.gmail.com with ESMTPSA id p10-20020a170902780a00b0016417aac283sm2165292pll.181.2022.06.01.17.30.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 17:30:56 -0700 (PDT) Received: by localhost (sSMTP sendmail emulation); Wed, 01 Jun 2022 17:30:51 -0700 From: pal@sandflow.com To: ffmpeg-devel@ffmpeg.org Date: Wed, 1 Jun 2022 17:30:37 -0700 Message-Id: <20220602003037.24597-6-pal@sandflow.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220602003037.24597-1-pal@sandflow.com> References: <20220602003037.24597-1-pal@sandflow.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v4 6/6] avfilter/showinfo: refactor to use avutil/uuid 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 Cc: Pierre-Anthony Lemieux 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: From: Pierre-Anthony Lemieux --- libavfilter/vf_showinfo.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c index 12d39310ef..6efcafce28 100644 --- a/libavfilter/vf_showinfo.c +++ b/libavfilter/vf_showinfo.c @@ -42,6 +42,7 @@ #include "libavutil/mastering_display_metadata.h" #include "libavutil/video_enc_params.h" #include "libavutil/detection_bbox.h" +#include "libavutil/uuid.h" #include "avfilter.h" #include "internal.h" @@ -421,29 +422,20 @@ static void dump_video_enc_params(AVFilterContext *ctx, const AVFrameSideData *s static void dump_sei_unregistered_metadata(AVFilterContext *ctx, const AVFrameSideData *sd) { - const int uuid_size = 16; const uint8_t *user_data = sd->data; - int i; - if (sd->size < uuid_size) { + if (sd->size < AV_UUID_LEN) { av_log(ctx, AV_LOG_ERROR, "invalid data(%"SIZE_SPECIFIER" < " - "UUID(%d-bytes))\n", sd->size, uuid_size); + "UUID(%d-bytes))\n", sd->size, AV_UUID_LEN); return; } av_log(ctx, AV_LOG_INFO, "User Data Unregistered:\n"); - av_log(ctx, AV_LOG_INFO, "UUID="); - for (i = 0; i < uuid_size; i++) { - av_log(ctx, AV_LOG_INFO, "%02x", user_data[i]); - if (i == 3 || i == 5 || i == 7 || i == 9) - av_log(ctx, AV_LOG_INFO, "-"); - } - av_log(ctx, AV_LOG_INFO, "\n"); + av_log(ctx, AV_LOG_INFO, "UUID=" AV_PRI_UUID "\n", AV_UUID_ARG(user_data)); av_log(ctx, AV_LOG_INFO, "User Data="); - for (; i < sd->size; i++) { + for (size_t i = 16; i < sd->size; i++) av_log(ctx, AV_LOG_INFO, "%02x", user_data[i]); - } av_log(ctx, AV_LOG_INFO, "\n"); } -- 2.25.1 _______________________________________________ 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".