summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorPierre-Anthony Lemieux <pal@palemieux.com>2022-06-01 17:30:35 -0700
committerZane van Iperen <zane@zanevaniperen.com>2022-06-12 18:34:37 +1000
commit1fd6758178a692f71309f60581b0b26af72bc82d (patch)
treeda8feef41751e192f9c2b34ecefd3437952f11d9 /libavformat
parenta2c1a439b304ca11ff9253ec69a047b720c5796e (diff)
avformat/smoothstreamingenc: refactor to use avutil/uuid
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/smoothstreamingenc.c7
1 files 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);