[FFmpeg-trac] #1026(avformat:new): libavformat::av_read_frame does not return waiting for udp packets when interrupted

FFmpeg trac at avcodec.org
Tue Feb 28 15:05:57 CET 2012


#1026: libavformat::av_read_frame does not return waiting for udp packets when
interrupted
-------------------------------------+-------------------------------------
             Reporter:  asif         |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  important    |                Component:  avformat
              Version:  0.10         |               Resolution:
             Keywords:               |               Blocked By:
  deadlock,interrupt                 |  Reproduced by developer:  0
             Blocking:               |
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by asif):

 Possible fix:

 1. Revert the changes that were made in the following commit:


 {{{
 author  Baptiste Coudurier <baptiste.coudurier at gmail.com>

         Fri, 4 Mar 2011 04:33:44 +0100 (19:33 -0800)
 committer       Baptiste Coudurier <baptiste.coudurier at gmail.com>

         Fri, 4 Mar 2011 04:34:59 +0100 (19:34 -0800)


 File: libavformat/avio.c

 diff --git a/libavformat/avio.c b/libavformat/avio.c
 index a19ec37..cf07c6d 100644 (file)
 --- a/libavformat/avio.c

 +++ b/libavformat/avio.c
 @@ -214,8 +214,6 @@ static inline int retry_transfer_wrapper(URLContext
 *h, unsigned char *buf, int

      len = 0;
      while (len < size_min) {
 -        if (url_interrupt_cb())
 -            return AVERROR(EINTR);
          ret = transfer_func(h, buf+len, size-len);
          if (ret == AVERROR(EINTR))
              continue;

 }}}

 2. Modify libavformat/avio.c::retry_transfer_wrapper as below

 {{{
      len = 0;
      while (len < size_min) {
          ret = transfer_func(h, buf+len, size-len);
          if (ret == AVERROR(EINTR))
 +            return AVERROR(EINTR);

 }}}

 3. Or, return Another error from libavformat/udp.c::circular_buffer_task
 e.g. EIO

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1026#comment:1>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list