aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vp6.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2023-04-12 13:58:54 -0300
committerJames Almer <jamrial@gmail.com>2023-05-04 18:48:22 -0300
commitdc7bd7c5a5ad5ea800dfb63cc5dd15670d065527 (patch)
tree91cd3a4ae8b34601f34ff98aa4beb1ac1b5b28c2 /libavcodec/vp6.c
parentcc11191fda0471017b03c1434d6d8cb79f6914e5 (diff)
downloadffmpeg-dc7bd7c5a5ad5ea800dfb63cc5dd15670d065527.tar.gz
avcodec: use the new AVFrame key_frame flag in all decoders and encoders
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/vp6.c')
-rw-r--r--libavcodec/vp6.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libavcodec/vp6.c b/libavcodec/vp6.c
index 9bbfa0eb5d..7a519cf10d 100644
--- a/libavcodec/vp6.c
+++ b/libavcodec/vp6.c
@@ -57,10 +57,13 @@ static int vp6_parse_header(VP56Context *s, const uint8_t *buf, int buf_size)
int ret;
int separated_coeff = buf[0] & 1;
- s->frames[VP56_FRAME_CURRENT]->key_frame = !(buf[0] & 0x80);
+ if (!(buf[0] & 0x80))
+ s->frames[VP56_FRAME_CURRENT]->flags |= AV_FRAME_FLAG_KEY;
+ else
+ s->frames[VP56_FRAME_CURRENT]->flags &= ~AV_FRAME_FLAG_KEY;
ff_vp56_init_dequant(s, (buf[0] >> 1) & 0x3F);
- if (s->frames[VP56_FRAME_CURRENT]->key_frame) {
+ if (s->frames[VP56_FRAME_CURRENT]->flags & AV_FRAME_FLAG_KEY) {
sub_version = buf[1] >> 3;
if (sub_version > 8)
return AVERROR_INVALIDDATA;
@@ -299,7 +302,7 @@ static int vp6_parse_coeff_models(VP56Context *s)
if (vpx_rac_get_prob_branchy(c, vp6_dccv_pct[pt][node])) {
def_prob[node] = vp56_rac_gets_nn(c, 7);
model->coeff_dccv[pt][node] = def_prob[node];
- } else if (s->frames[VP56_FRAME_CURRENT]->key_frame) {
+ } else if (s->frames[VP56_FRAME_CURRENT]->flags & AV_FRAME_FLAG_KEY) {
model->coeff_dccv[pt][node] = def_prob[node];
}
@@ -322,7 +325,7 @@ static int vp6_parse_coeff_models(VP56Context *s)
if (vpx_rac_get_prob_branchy(c, vp6_ract_pct[ct][pt][cg][node])) {
def_prob[node] = vp56_rac_gets_nn(c, 7);
model->coeff_ract[pt][ct][cg][node] = def_prob[node];
- } else if (s->frames[VP56_FRAME_CURRENT]->key_frame) {
+ } else if (s->frames[VP56_FRAME_CURRENT]->flags & AV_FRAME_FLAG_KEY) {
model->coeff_ract[pt][ct][cg][node] = def_prob[node];
}