[FFmpeg-cvslog] r16718 - trunk/libavformat/utils.c

Michael Niedermayer michaelni
Mon Mar 2 16:40:29 CET 2009


On Sun, Mar 01, 2009 at 10:45:38PM -0800, Baptiste Coudurier wrote:
> michael wrote:
> > Author: michael
> > Date: Thu Jan 22 13:06:02 2009
> > New Revision: 16718
> > 
> > Log:
> > Handle av_read_frame() EAGAIN return.
> > 
> > Modified:
> >    trunk/libavformat/utils.c
> > 
> > Modified: trunk/libavformat/utils.c
> > ==============================================================================
> > --- trunk/libavformat/utils.c	Thu Jan 22 13:04:01 2009	(r16717)
> > +++ trunk/libavformat/utils.c	Thu Jan 22 13:06:02 2009	(r16718)
> > @@ -1493,7 +1493,10 @@ static int av_seek_frame_generic(AVForma
> >                  return ret;
> >          }
> >          for(i=0;; i++) {
> > -            int ret = av_read_frame(s, &pkt);
> > +            int ret;
> > +            do{
> > +                ret = av_read_frame(s, &pkt);
> > +            }while(ret == AVERROR(EAGAIN));
> >              if(ret<0)
> >                  break;
> >              av_free_packet(&pkt);
> > @@ -1718,7 +1721,9 @@ static void av_estimate_timings_from_pts
> >          if (i == ic->nb_streams)
> >              break;
> >  
> > -        ret = av_read_packet(ic, pkt);
> > +        do{
> > +            ret = av_read_packet(ic, pkt);
> > +        }while(ret == AVERROR(EAGAIN));
> >          if (ret != 0)
> >              break;
> >          read_size += pkt->size;
> > @@ -1743,7 +1748,9 @@ static void av_estimate_timings_from_pts
> >          if (read_size >= DURATION_MAX_READ_SIZE)
> >              break;
> >  
> > -        ret = av_read_packet(ic, pkt);
> > +        do{
> > +            ret = av_read_packet(ic, pkt);
> > +        }while(ret == AVERROR(EAGAIN));
> >          if (ret != 0)
> >              break;
> >          read_size += pkt->size;
> > @@ -2044,6 +2051,8 @@ int av_find_stream_info(AVFormatContext 
> >          /* NOTE: a new stream can be added there if no header in file
> >             (AVFMTCTX_NOHEADER) */
> >          ret = av_read_frame_internal(ic, &pkt1);
> > +        if(ret == AVERROR(EAGAIN))
> > +            continue;
> >          if (ret < 0) {
> >              /* EOF or error */
> >              ret = -1; /* we could not have all the codec parameters before EOF */
> 
> I believe this commit broke FFserver in fact. Many users reported problems.
> 
> I propose to revert this commit, the flvdec.c commit and the ffmpeg.c
> one before the release.

you can do what you/diego see fit to the release branch

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20090302/3c746b01/attachment.pgp>



More information about the ffmpeg-cvslog mailing list