summaryrefslogtreecommitdiff
path: root/libavcodec/cbs_av1_syntax_template.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2018-10-26 21:32:36 -0300
committerJames Almer <jamrial@gmail.com>2018-10-27 16:06:36 -0300
commit99ef8b8afd993fec3160c633f5fe87cceb7fe392 (patch)
tree95a2789f5aef3ff8d9b6d6eabfada05eff08f463 /libavcodec/cbs_av1_syntax_template.c
parentfef2162b6ea752c76a1220f59ad962b65a400fc3 (diff)
avcodec/cbs_av1: fix parsing frame_size_with_refs
found_ref is not a single value in the bitstream. Fixes parsing files with frame size changes. Based on code from cbs_vp9. Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/cbs_av1_syntax_template.c')
-rw-r--r--libavcodec/cbs_av1_syntax_template.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/cbs_av1_syntax_template.c b/libavcodec/cbs_av1_syntax_template.c
index 84ab2973ab..e146bbf8bb 100644
--- a/libavcodec/cbs_av1_syntax_template.c
+++ b/libavcodec/cbs_av1_syntax_template.c
@@ -417,8 +417,8 @@ static int FUNC(frame_size_with_refs)(CodedBitstreamContext *ctx, RWContext *rw,
int i, err;
for (i = 0; i < AV1_REFS_PER_FRAME; i++) {
- flag(found_ref);
- if (current->found_ref) {
+ flags(found_ref[i], 1, i);
+ if (current->found_ref[i]) {
AV1ReferenceFrameState *ref =
&priv->ref[current->ref_frame_idx[i]];
@@ -439,7 +439,7 @@ static int FUNC(frame_size_with_refs)(CodedBitstreamContext *ctx, RWContext *rw,
}
}
- if (current->found_ref == 0) {
+ if (i >= AV1_REFS_PER_FRAME) {
CHECK(FUNC(frame_size)(ctx, rw, current));
CHECK(FUNC(render_size)(ctx, rw, current));
} else {