Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Zane van Iperen <zane@zanevaniperen.com>
To: ffmpeg-devel@ffmpeg.org
Cc: Pierre-Anthony Lemieux <pal@palemieux.com>
Subject: [FFmpeg-devel] [PATCH v2 4/7] avformat/smoothstreamingenc: refactor to use avutil/uuid
Date: Sun, 24 Apr 2022 20:14:06 +1000
Message-ID: <20220424101409.95486-5-zane@zanevaniperen.com> (raw)
In-Reply-To: <20220424101409.95486-1-zane@zanevaniperen.com>

From: Pierre-Anthony Lemieux <pal@palemieux.com>

---
 libavformat/smoothstreamingenc.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/libavformat/smoothstreamingenc.c b/libavformat/smoothstreamingenc.c
index c67f0cba43..3d857b932e 100644
--- a/libavformat/smoothstreamingenc.c
+++ b/libavformat/smoothstreamingenc.c
@@ -38,6 +38,7 @@
 #include "libavutil/file.h"
 #include "libavutil/mathematics.h"
 #include "libavutil/intreadwrite.h"
+#include "libavutil/uuid.h"
 
 typedef struct Fragment {
     int64_t start_time, duration;
@@ -420,13 +421,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.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".

  parent reply	other threads:[~2022-04-24 10:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-24 10:14 [FFmpeg-devel] [PATCH v2 0/7] Add UUID functionality to libavutil Zane van Iperen
2022-04-24 10:14 ` [FFmpeg-devel] [PATCH v2 1/7] avutil/uuid: add utility library for manipulating UUIDs as specified in RFC 4122 Zane van Iperen
2022-05-10 13:18   ` Andreas Rheinhardt
2022-05-11 15:02     ` Zane van Iperen
2022-05-31  3:17       ` Pierre-Anthony Lemieux
2022-05-11 11:53   ` Anton Khirnov
2022-05-11 15:02     ` Zane van Iperen
2022-05-31  3:16       ` Pierre-Anthony Lemieux
2022-04-24 10:14 ` [FFmpeg-devel] [PATCH v2 2/7] avutil/tests/uuid: add uuid tests Zane van Iperen
2022-04-24 10:14 ` [FFmpeg-devel] [PATCH v2 3/7] avformat/mov: refactor to use avutil/uuid Zane van Iperen
2022-04-24 10:14 ` Zane van Iperen [this message]
2022-04-24 10:14 ` [FFmpeg-devel] [PATCH v2 5/7] avcodec/cbs_sei: " Zane van Iperen
2022-04-30 17:31   ` Mark Thompson
2022-04-30 17:53     ` Pierre-Anthony Lemieux
2022-04-30 19:25       ` Mark Thompson
2022-04-30 20:53         ` Pierre-Anthony Lemieux
2022-05-01 21:06           ` Mark Thompson
2022-05-04 16:21             ` Zane van Iperen
2022-04-24 10:14 ` [FFmpeg-devel] [PATCH v2 6/7] avformat/imf: " Zane van Iperen
2022-04-24 10:14 ` [FFmpeg-devel] [PATCH v2 7/7] avfilter/showinfo: " Zane van Iperen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220424101409.95486-5-zane@zanevaniperen.com \
    --to=zane@zanevaniperen.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=pal@palemieux.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git