[FFmpeg-trac] #10210(avcodec:new): On Windows with x86 build, calling avcodec_send_packet does not free FPU registers

FFmpeg trac at avcodec.org
Mon Mar 13 18:14:27 EET 2023


#10210: On Windows with x86 build, calling avcodec_send_packet does not free FPU
registers
-------------------------------------+-------------------------------------
             Reporter:  Kevin        |                    Owner:  (none)
  Coulombe                           |
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:  avcodec
              Version:  git-master   |               Resolution:
             Keywords:  avcodec FPU  |               Blocked By:
  fld ST0 x87                        |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Comment (by Seb):

 Ffmpeg releases the FPU registers after calling `codec->cb.decode()` (in
 `decode_simple_internal()`).

 It would seem logical to do the same after calling
 `codec->cb.receive_frame()` since there is no guarantee that the codec's
 implementation will do it. Something along the lines of:


 {{{
 --- a/libavcodec/decode.c
 +++ b/libavcodec/decode.c
 @@ -547,6 +547,7 @@ static int
 decode_receive_frame_internal(AVCodecContext *avctx, AVFrame *frame)

      if (codec->cb_type == FF_CODEC_CB_TYPE_RECEIVE_FRAME) {
          ret = codec->cb.receive_frame(avctx, frame);
 +        emms_c();
      } else
          ret = decode_simple_receive_frame(avctx, frame);

 }}}

 While I cannot reproduce the issue with the JPEG image since the MJPEG
 decoder is now based on `decode`, 10 codecs are still implementing
 `receive_frame`.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/10210#comment:9>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list