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 34C7C4336E for ; Thu, 2 Jun 2022 00:31:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D38EE68B7CD; Thu, 2 Jun 2022 03:31:00 +0300 (EEST) Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 82BE668B7B9 for ; Thu, 2 Jun 2022 03:30:54 +0300 (EEST) Received: by mail-pj1-f48.google.com with SMTP id l7-20020a17090aaa8700b001dd1a5b9965so3491841pjq.2 for ; Wed, 01 Jun 2022 17:30:54 -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=GPCNFhxTJEUIwenjwOkEroZReC0gaxOgCbdJIKjOgLqrMuW5daQfyjA+o7+FMReWUx UcVeSkZiC99b2w8bQD1KgVVgjhebE0gOx50mS3de7JQkaTXN4FVZFQbjp03B2D07/SFH epwbM+DIPts/QxwXfgkugglV36aoK3g5O1yx5aLZwXpHfO0yyxb/tGi1d3vo0NNhJIx6 FtMlyU71VMDlVWUGn1wMK+snrU1e1CJbT72yApxb0B35jnSqvzYxRBYua2QSio7q3NYv G2iJkdrgW+/QMRDkP4DKmIE/zgW2opFFscmiJL+VXpTImh7v2xC6itZ6bmdx+0zLjz6T LDDw== X-Gm-Message-State: AOAM530D7pKe/Fy0N1hgi6u6qHqcTC58K6MNcR2J73/Ze6wShmfh+QMd on90R9rcGUJQES2DbdAs+L1XQzoO5Fk= X-Google-Smtp-Source: ABdhPJxaJ4T/4Yjgq/TmM5jKGERKvVyNdvGeyUZKvZGDQQpiCFZyn7FD5A5H9LZ12avxX7TV7cVyww== X-Received: by 2002:a17:90a:bb0e:b0:1dc:a406:3566 with SMTP id u14-20020a17090abb0e00b001dca4063566mr2162535pjr.135.1654129852595; Wed, 01 Jun 2022 17:30:52 -0700 (PDT) Received: from localhost (76-14-89-2.sf-cable.astound.net. [76.14.89.2]) by smtp.gmail.com with ESMTPSA id u188-20020a6279c5000000b0050dc76281aasm2051375pfc.132.2022.06.01.17.30.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 17:30:52 -0700 (PDT) Received: by localhost (sSMTP sendmail emulation); Wed, 01 Jun 2022 17:30:47 -0700 From: pal@sandflow.com To: ffmpeg-devel@ffmpeg.org Date: Wed, 1 Jun 2022 17:30:35 -0700 Message-Id: <20220602003037.24597-4-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 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".