shithub: dav1d

Download patch

ref: d401106b2a764422d6233cb2f5f3d90a8e5883c4
parent: 7ef74ca1005785f0791874d52217aecc76f190cd
author: Ronald S. Bultje <[email protected]>
date: Tue Nov 13 06:51:10 EST 2018

Fix parsing of render size

Fixes decoding of keyframe in #121.

--- a/src/obu.c
+++ b/src/obu.c
@@ -293,8 +293,8 @@
     if (hdr->super_res) return -1; // FIXME
     hdr->have_render_size = dav1d_get_bits(gb, 1);
     if (hdr->have_render_size) {
-        hdr->render_width = dav1d_get_bits(gb, seqhdr->width_n_bits) + 1;
-        hdr->render_height = dav1d_get_bits(gb, seqhdr->height_n_bits) + 1;
+        hdr->render_width = dav1d_get_bits(gb, 16) + 1;
+        hdr->render_height = dav1d_get_bits(gb, 16) + 1;
     } else {
         hdr->render_width = hdr->width;
         hdr->render_height = hdr->height;