avcodec/ffv1enc: restore header writing behavior for version > 1

Broken by accident in a6c58353ac.

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2024-11-18 18:21:54 -03:00
parent f3eca3f387
commit d6b39373a2
1 changed files with 6 additions and 4 deletions

View File

@ -918,11 +918,13 @@ static int encode_init_internal(AVCodecContext *avctx)
if (ret < 0)
return ret;
if ((ret = encode_determine_slices(avctx)) < 0)
return ret;
if (s->version > 1) {
if ((ret = encode_determine_slices(avctx)) < 0)
return ret;
if ((ret = ff_ffv1_write_extradata(avctx)) < 0)
return ret;
if ((ret = ff_ffv1_write_extradata(avctx)) < 0)
return ret;
}
if ((ret = ff_ffv1_init_slice_contexts(s)) < 0)
return ret;