shithub: dav1d

Download patch

ref: 5e0087d9eb3a6ac1a16338241bb1a047e8fd55ab
parent: 6d87752bbaa75c80a98db558386e46c59c7bbf6f
author: James Almer <jamrial@gmail.com>
date: Thu Nov 29 17:53:14 EST 2018

common: make 0 the default for Dav1dDataProps.duration

--- a/include/dav1d/common.h
+++ b/include/dav1d/common.h
@@ -53,7 +53,7 @@
  */
 typedef struct Dav1dDataProps {
     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)
     size_t size; ///< packet size, default Dav1dData.sz
 } Dav1dDataProps;
--- a/src/data.c
+++ b/src/data.c
@@ -65,7 +65,8 @@
     buf->data = ptr;
     buf->sz = buf->m.size = sz;
     buf->m.timestamp = INT64_MIN;
-    buf->m.duration = buf->m.offset = -1;
+    buf->m.duration = 0;
+    buf->m.offset = -1;
 
     return 0;
 }
--- a/src/picture.c
+++ b/src/picture.c
@@ -118,7 +118,8 @@
     p->p.w = w;
     p->p.h = h;
     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.bpc = bpc;
     int res = p_allocator->alloc_picture_callback(p, p_allocator->cookie);