You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/utils: Move emms_c() before memory allocation functions in avcodec_encode_video2()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -1994,6 +1994,8 @@ int attribute_align_arg avcodec_encode_video2(AVCodecContext *avctx,
|
|||||||
ret = avctx->codec->encode2(avctx, avpkt, frame, got_packet_ptr);
|
ret = avctx->codec->encode2(avctx, avpkt, frame, got_packet_ptr);
|
||||||
av_assert0(ret <= 0);
|
av_assert0(ret <= 0);
|
||||||
|
|
||||||
|
emms_c();
|
||||||
|
|
||||||
if (avpkt->data && avpkt->data == avctx->internal->byte_buffer) {
|
if (avpkt->data && avpkt->data == avctx->internal->byte_buffer) {
|
||||||
needs_realloc = 0;
|
needs_realloc = 0;
|
||||||
if (user_pkt.data) {
|
if (user_pkt.data) {
|
||||||
@@ -2031,7 +2033,6 @@ int attribute_align_arg avcodec_encode_video2(AVCodecContext *avctx,
|
|||||||
if (ret < 0 || !*got_packet_ptr)
|
if (ret < 0 || !*got_packet_ptr)
|
||||||
av_packet_unref(avpkt);
|
av_packet_unref(avpkt);
|
||||||
|
|
||||||
emms_c();
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user