ffv1: Store a flag in the global header that indicates if all frames are keyframes

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-04-27 16:04:25 +02:00
parent cc5c155959
commit 1a392fc550
3 changed files with 5 additions and 1 deletions

View File

@ -106,6 +106,7 @@ typedef struct FFV1Context {
int16_t *sample_buffer;
int ec;
int intra;
int slice_damaged;
int key_frame_ok;

View File

@ -498,6 +498,8 @@ static int read_extra_header(FFV1Context *f)
if (f->version > 2) {
f->ec = get_symbol(c, state, 0);
if (f->minor_version > 2)
f->intra = get_symbol(c, state, 0);
}
if (f->version > 2) {

View File

@ -534,7 +534,7 @@ static int write_extradata(FFV1Context *f)
put_symbol(c, state, f->version, 0);
if (f->version > 2) {
if (f->version == 3)
f->minor_version = 2;
f->minor_version = 3;
put_symbol(c, state, f->minor_version, 0);
}
@ -575,6 +575,7 @@ static int write_extradata(FFV1Context *f)
if (f->version > 2) {
put_symbol(c, state, f->ec, 0);
put_symbol(c, state, f->intra = (f->avctx->gop_size < 2), 0);
}
f->avctx->extradata_size = ff_rac_terminate(c);