common: make 0 the default for Dav1dDataProps.duration

parent 6d87752b
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
*/ */
typedef struct Dav1dDataProps { typedef struct Dav1dDataProps {
int64_t timestamp; ///< container timestamp of input data, INT64_MIN if unknown (default) int64_t timestamp; ///< container timestamp of input data, INT64_MIN if unknown (default)
int64_t duration; ///< container duration of input data, -1 if unknown (default) int64_t duration; ///< container duration of input data, 0 if unknown (default)
int64_t offset; ///< stream offset of input data, -1 if unknown (default) int64_t offset; ///< stream offset of input data, -1 if unknown (default)
size_t size; ///< packet size, default Dav1dData.sz size_t size; ///< packet size, default Dav1dData.sz
} Dav1dDataProps; } Dav1dDataProps;
......
...@@ -65,7 +65,8 @@ int dav1d_data_wrap(Dav1dData *const buf, const uint8_t *const ptr, const size_t ...@@ -65,7 +65,8 @@ int dav1d_data_wrap(Dav1dData *const buf, const uint8_t *const ptr, const size_t
buf->data = ptr; buf->data = ptr;
buf->sz = buf->m.size = sz; buf->sz = buf->m.size = sz;
buf->m.timestamp = INT64_MIN; buf->m.timestamp = INT64_MIN;
buf->m.duration = buf->m.offset = -1; buf->m.duration = 0;
buf->m.offset = -1;
return 0; return 0;
} }
......
...@@ -118,7 +118,8 @@ static int picture_alloc_with_edges(Dav1dPicture *const p, ...@@ -118,7 +118,8 @@ static int picture_alloc_with_edges(Dav1dPicture *const p,
p->p.w = w; p->p.w = w;
p->p.h = h; p->p.h = h;
p->m.timestamp = INT64_MIN; p->m.timestamp = INT64_MIN;
p->m.duration = p->m.offset = -1; p->m.duration = 0;
p->m.offset = -1;
p->p.layout = layout; p->p.layout = layout;
p->p.bpc = bpc; p->p.bpc = bpc;
int res = p_allocator->alloc_picture_callback(p, p_allocator->cookie); int res = p_allocator->alloc_picture_callback(p, p_allocator->cookie);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment