mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-05 23:34:35 +08:00
dont call emms_c() for each MB
Originally committed as revision 1127 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@ -120,6 +120,9 @@ int avcodec_encode_video(AVCodecContext *avctx, UINT8 *buf, int buf_size,
|
||||
int ret;
|
||||
|
||||
ret = avctx->codec->encode(avctx, buf, buf_size, (void *)pict);
|
||||
|
||||
emms_c(); //needed to avoid a emms_c() call before every return;
|
||||
|
||||
avctx->frame_number++;
|
||||
return ret;
|
||||
}
|
||||
@ -135,6 +138,9 @@ int avcodec_decode_video(AVCodecContext *avctx, AVPicture *picture,
|
||||
|
||||
ret = avctx->codec->decode(avctx, picture, got_picture_ptr,
|
||||
buf, buf_size);
|
||||
|
||||
emms_c(); //needed to avoid a emms_c() call before every return;
|
||||
|
||||
if (*got_picture_ptr)
|
||||
avctx->frame_number++;
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user