ref: e4ee4532e588e3df18bb9c812d4541884821fc43
parent: 69a0cbd9ee2d07bfcad5789ce23ca53b0aa83ef6
author: James Almer <jamrial@gmail.com>
date: Thu Nov 29 17:26:00 EST 2018
common: make -1 the default for Dav1dDataProps.offset
--- a/include/dav1d/common.h
+++ b/include/dav1d/common.h
@@ -54,7 +54,7 @@
typedef struct Dav1dDataProps {
int64_t timestamp; ///< container timestamp of input data, default INT64_MIN
int64_t duration; ///< container duration of input data, default -1
- int64_t offset; ///< stream offset of input data, default INT64_MIN
+ int64_t offset; ///< stream offset of input data, default -1
size_t size; ///< packet size, default Dav1dData.sz
} Dav1dDataProps;
--- a/src/data.c
+++ b/src/data.c
@@ -64,8 +64,8 @@
if (!buf->ref) return -ENOMEM;
buf->data = ptr;
buf->sz = buf->m.size = sz;
- buf->m.timestamp = buf->m.offset = INT64_MIN;
- buf->m.duration = -1;
+ buf->m.timestamp = INT64_MIN;
+ buf->m.duration = buf->m.offset = -1;
return 0;
}
--- a/src/picture.c
+++ b/src/picture.c
@@ -117,8 +117,8 @@
p->p.w = w;
p->p.h = h;
- p->m.timestamp = p->m.offset = INT64_MIN;
- p->m.duration = -1;
+ p->m.timestamp = INT64_MIN;
+ p->m.duration = p->m.offset = -1;
p->p.layout = layout;
p->p.bpc = bpc;
int res = p_allocator->alloc_picture_callback(p, p_allocator->cookie);