diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c index 0d63dd8bf7..3eee963054 100644 --- a/libavcodec/ffv1.c +++ b/libavcodec/ffv1.c @@ -165,6 +165,7 @@ typedef struct FFV1Context{ uint64_t rc_stat[256][2]; uint64_t (*rc_stat2[MAX_QUANT_TABLES])[32][2]; int version; + int minor_version; int width, height; int chroma_h_shift, chroma_v_shift; int chroma_planes; @@ -778,6 +779,8 @@ static int write_extra_header(FFV1Context *f){ ff_build_rac_states(c, 0.05*(1LL<<32), 256-8); put_symbol(c, state, f->version, 0); + if(f->version > 2) + put_symbol(c, state, f->minor_version, 0); put_symbol(c, state, f->ac, 0); if(f->ac>1){ for(i=1; i<256; i++){ @@ -1543,6 +1546,8 @@ static int read_extra_header(FFV1Context *f){ ff_build_rac_states(c, 0.05*(1LL<<32), 256-8); f->version= get_symbol(c, state, 0); + if(f->version > 2) + f->minor_version= get_symbol(c, state, 0); f->ac= f->avctx->coder_type= get_symbol(c, state, 0); if(f->ac>1){ for(i=1; i<256; i++){