mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-11 08:13:06 +00:00
ffv1enc: write f->flt to extradata
The parser has been reading f->flt for combined_version >= 0x40004
since commit c1b330bf24 (avcodec/ffv1: Basic float16 support), but
ff_ffv1_write_extradata() never had a matching put_symbol().
The result was that the parsed f->flt was whatever the next symbol's
worth of rangecoded bits happened to decode to — often 0, but for a
yuv420p16le -level 4 -strict experimental stream produced locally it
parses as 1. The software decoder doesn't notice because the YUV
pixfmt-selection branches never check f->flt, but anything else that
trusts it gets garbage.
Sponsored-by: Sovereign Tech Fund
This commit is contained in:
@@ -506,6 +506,8 @@ av_cold int ff_ffv1_write_extradata(AVCodecContext *avctx)
|
||||
if (f->version > 2) {
|
||||
put_symbol(&c, state, f->ec, 0);
|
||||
put_symbol(&c, state, f->intra = (f->avctx->gop_size < 2), 0);
|
||||
if (f->combined_version >= 0x40004)
|
||||
put_symbol(&c, state, f->flt, 0);
|
||||
}
|
||||
|
||||
f->avctx->extradata_size = ff_rac_terminate(&c, 0);
|
||||
|
||||
Reference in New Issue
Block a user