Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2018-11-22 17:43:36 +0300
committerJames Almer <jamrial@gmail.com>2018-11-22 17:43:36 +0300
commit82404efb061fead594df2e8ba2a99c0c0cc4b8e9 (patch)
treeb98f8404ea4e6344831517378a60e487c375e0e5
parent2b39cfb01288bf775281c8ae1a446ec4011bc887 (diff)
obu: set have_frame_hdr to true only when there were no errors
-rw-r--r--src/obu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/obu.c b/src/obu.c
index 113dd8f..1a05c51 100644
--- a/src/obu.c
+++ b/src/obu.c
@@ -1219,7 +1219,6 @@ int dav1d_parse_obus(Dav1dContext *const c, Dav1dData *const in) {
if (!c->have_seq_hdr) goto error;
if ((res = parse_frame_hdr(c, &gb)) < 0)
return res;
- c->have_frame_hdr = 1;
for (int n = 0; n < c->n_tile_data; n++)
dav1d_data_unref(&c->tile[n].data);
c->n_tile_data = 0;
@@ -1231,11 +1230,14 @@ int dav1d_parse_obus(Dav1dContext *const c, Dav1dData *const in) {
if (check_for_overrun(&gb, init_bit_pos, len))
return -EINVAL;
+ c->have_frame_hdr = 1;
break;
}
// OBU_FRAMEs shouldn't be signalled with show_existing_frame
if (c->frame_hdr.show_existing_frame) goto error;
+ c->have_frame_hdr = 1;
+
// This is the frame header at the start of a frame OBU.
// There's no trailing bit at the end to skip, but we do need
// to align to the next byte.