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 F07D34078B for ; Tue, 31 May 2022 03:15:07 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F2E3868B64A; Tue, 31 May 2022 06:14:44 +0300 (EEST) Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DF1E868B635 for ; Tue, 31 May 2022 06:14:37 +0300 (EEST) Received: by mail-pl1-f172.google.com with SMTP id t2so4119697pld.4 for ; Mon, 30 May 2022 20:14:37 -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=inOmA3C9ICUbIrIDk7VOwMY3IWzQMQ6mpJixCyln1ns=; b=IV4T0s9GpHObvGKZnK77YjXGSWkCjkywhF7PtC8K0a2TobCmZGq0zSftj4zBTVnvFt u4sI4z/D5NCb6nhqQNwisN8/zbvDdJy5g7MUHUpbh9ecYnOLelJobADA2Magz3ClXUBm Wcty5gv/fn7LnhDMr6Hb04mu1XrklGjSUp1xnKuRim6Jpd+kJ7K9pZWuiX9ekASwuzCr nN2fhFNm1OjbUXb0QtLkuI6g7YwUQXdE3qXXZHcvBDnWr2K4/A05qjnj/yPwactEaPHp PHgVnQJKn4gcJja55dV1sgZy0Z1RO7c9jRXLg6LmujDOTFLuErIc4n7cLUVmXToHKty3 uBkQ== X-Gm-Message-State: AOAM53045Y0OY+udzd+KJSO237zV5IFWYsvf2jtBYYWsdyWSdAS5y8JY 66AbxLpYERsm350XLfwxBlnTjIE2YbE= X-Google-Smtp-Source: ABdhPJy2ZDRd6z2WAbmdt33Rq4+m0QnjMqddDN50j/b97PKFUAjKyqTWJ5bUSnFz0I/s8HZ5ihXkoQ== X-Received: by 2002:a17:902:aa07:b0:162:467:db94 with SMTP id be7-20020a170902aa0700b001620467db94mr47964409plb.26.1653966875939; Mon, 30 May 2022 20:14:35 -0700 (PDT) Received: from localhost (76-14-89-2.sf-cable.astound.net. [76.14.89.2]) by smtp.gmail.com with ESMTPSA id v20-20020a1709028d9400b0016378bfeb90sm9829384plo.227.2022.05.30.20.14.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 20:14:35 -0700 (PDT) Received: by localhost (sSMTP sendmail emulation); Mon, 30 May 2022 20:14:32 -0700 From: pal@sandflow.com To: ffmpeg-devel@ffmpeg.org Date: Mon, 30 May 2022 20:13:33 -0700 Message-Id: <20220531031334.19488-4-pal@sandflow.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220531031334.19488-1-pal@sandflow.com> References: <20220531031334.19488-1-pal@sandflow.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 4/6] avformat/smoothstreamingenc: 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 --- libavformat/smoothstreamingenc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavformat/smoothstreamingenc.c b/libavformat/smoothstreamingenc.c index 1713dd9009..ade6d5723b 100644 --- a/libavformat/smoothstreamingenc.c +++ b/libavformat/smoothstreamingenc.c @@ -34,6 +34,7 @@ #include "libavutil/opt.h" #include "libavutil/avstring.h" #include "libavutil/mathematics.h" +#include "libavutil/uuid.h" typedef struct Fragment { int64_t start_time, duration; @@ -416,13 +417,13 @@ static int parse_fragment(AVFormatContext *s, const char *filename, int64_t *sta if (len < 8 || len >= *moof_size) goto fail; if (tag == MKTAG('u','u','i','d')) { - static const uint8_t tfxd[] = { + static const AVUUID tfxd = { 0x6d, 0x1d, 0x9b, 0x05, 0x42, 0xd5, 0x44, 0xe6, 0x80, 0xe2, 0x14, 0x1d, 0xaf, 0xf7, 0x57, 0xb2 }; - uint8_t uuid[16]; + AVUUID uuid; avio_read(in, uuid, 16); - if (!memcmp(uuid, tfxd, 16) && len >= 8 + 16 + 4 + 16) { + if (av_uuid_equal(uuid, tfxd) && len >= 8 + 16 + 4 + 16) { avio_seek(in, 4, SEEK_CUR); *start_ts = avio_rb64(in); *duration = avio_rb64(in); -- 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".