diff options
author | Luc Trudeau <ltrudeau@twoorioles.com> | 2018-09-24 19:35:09 +0300 |
---|---|---|
committer | Luc Trudeau <ltrudeau@twoorioles.com> | 2018-09-25 10:43:20 +0300 |
commit | c71416582715945623f60f712260de168c878978 (patch) | |
tree | 43f75c54f18d46912c66096b420b10ec3f833c3a /src | |
parent | 7b70548104e9c679fb6f8307acd4cf5b086a6afb (diff) |
Fix undefined-behavior in obu.c
Removes undefined-behavior when primary_ref_frame is 7
Diffstat (limited to 'src')
-rw-r--r-- | src/obu.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -590,10 +590,14 @@ static int parse_frame_hdr(Dav1dContext *const c, GetBits *const gb, hdr->segmentation.seg_data.preskip = 1; } } + } else if (hdr->primary_ref_frame == PRIMARY_REF_NONE) { + memset(&hdr->segmentation.seg_data, 0, sizeof(Av1SegmentationDataSet)); } else { const int pri_ref = hdr->refidx[hdr->primary_ref_frame]; hdr->segmentation.seg_data = c->refs[pri_ref].seg_data; } + } else if (hdr->primary_ref_frame == PRIMARY_REF_NONE) { + memset(&hdr->segmentation.seg_data, 0, sizeof(Av1SegmentationDataSet)); } else { const int pri_ref = hdr->refidx[hdr->primary_ref_frame]; hdr->segmentation.seg_data = c->refs[pri_ref].seg_data; |