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 89373420BC for ; Tue, 22 Feb 2022 13:03:47 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C25F068B124; Tue, 22 Feb 2022 15:02:37 +0200 (EET) Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 89A0268B168 for ; Tue, 22 Feb 2022 15:02:31 +0200 (EET) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zanevaniperen.com; s=key1; t=1645534951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=v1ChksZYmN9FeHeu5OYnrnafJLaXwbhPNGK31DniN9U=; b=dJWxJE363AxUV76gmIs+7cY9jXUXbjErd7gJGHPHMXoMdf6wBdP8iLmAmtQUODGpX5U+QO FkPwG0WQczoEFrljj/3yWhR9gwyjR6zhqJtsZ6SpaT5jdhDAAMWOI/JANCk11p8RBb23sB pRAgapDaT75Z9RRa38LDiErX5YH0FHrHkyaTAyjj1TReww4k4CZzYFXc62KsrybZ19GNYN 63CFJjbAefyHdzkqw5UX89qjmWd17bkjF8AkmTcsl82TE6IB+3PhUwsNwNc6w/4Odrc6MC 95/fYdeef++DpOXtVUTrrTzDiX1WQ7L+YDmBomUsz+NhFeSuggJZkFLvRXBG6A== From: Zane van Iperen To: ffmpeg-devel@ffmpeg.org Date: Tue, 22 Feb 2022 23:01:53 +1000 Message-Id: <20220222130153.289215-8-zane@zanevaniperen.com> In-Reply-To: <20220222130153.289215-1-zane@zanevaniperen.com> References: <20220222130153.289215-1-zane@zanevaniperen.com> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: zanevaniperen.com Subject: [FFmpeg-devel] [PATCH 7/7] 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 Signed-off-by: Pierre-Anthony Lemieux Signed-off-by: Zane van Iperen --- libavfilter/vf_showinfo.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c index 71728bced4..395e87c486 100644 --- a/libavfilter/vf_showinfo.c +++ b/libavfilter/vf_showinfo.c @@ -41,6 +41,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" @@ -337,29 +338,21 @@ 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 (i = 16; i < sd->size; i++) av_log(ctx, AV_LOG_INFO, "%02x", user_data[i]); - } av_log(ctx, AV_LOG_INFO, "\n"); } -- 2.35.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".