mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avcodec/snowenc: Clear MMX state after edge drawing and picture encode
Fixes undefined behavior from calling libc allocation with unclean FPU state. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
de0cd0ffc9
commit
2c1d38d1e1
@ -1640,6 +1640,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|||||||
s->current_picture->linesize[2], w>>s->chroma_h_shift, h>>s->chroma_v_shift,
|
s->current_picture->linesize[2], w>>s->chroma_h_shift, h>>s->chroma_v_shift,
|
||||||
EDGE_WIDTH>>s->chroma_h_shift, EDGE_WIDTH>>s->chroma_v_shift, EDGE_TOP | EDGE_BOTTOM);
|
EDGE_WIDTH>>s->chroma_h_shift, EDGE_WIDTH>>s->chroma_v_shift, EDGE_TOP | EDGE_BOTTOM);
|
||||||
}
|
}
|
||||||
|
emms_c();
|
||||||
}
|
}
|
||||||
|
|
||||||
ff_snow_frame_start(s);
|
ff_snow_frame_start(s);
|
||||||
@ -1856,6 +1857,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
emms_c();
|
||||||
|
|
||||||
update_last_header_values(s);
|
update_last_header_values(s);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user