[FFmpeg-cvslog] r16719 - trunk/libavformat/flvdec.c

michael subversion
Thu Jan 22 13:08:07 CET 2009


Author: michael
Date: Thu Jan 22 13:08:06 2009
New Revision: 16719

Log:
Use EAGAIN return, primarely intended as example of EAGAIN useage.

Modified:
   trunk/libavformat/flvdec.c

Modified: trunk/libavformat/flvdec.c
==============================================================================
--- trunk/libavformat/flvdec.c	Thu Jan 22 13:06:02 2009	(r16718)
+++ trunk/libavformat/flvdec.c	Thu Jan 22 13:08:06 2009	(r16719)
@@ -309,7 +309,6 @@ static int flv_read_packet(AVFormatConte
     int64_t dts, pts = AV_NOPTS_VALUE;
     AVStream *st = NULL;
 
- retry:
  for(;;){
     pos = url_ftell(s->pb);
     url_fskip(s->pb, 4); /* size of previous packet */
@@ -345,7 +344,7 @@ static int flv_read_packet(AVFormatConte
             av_log(s, AV_LOG_ERROR, "skipping flv packet: type %d, size %d, flags %d\n", type, size, flags);
     skip:
         url_fseek(s->pb, next, SEEK_SET);
-        continue;
+        return AVERROR(EAGAIN);
     }
 
     /* skip empty data packets */
@@ -369,7 +368,7 @@ static int flv_read_packet(AVFormatConte
        || st->discard >= AVDISCARD_ALL
        ){
         url_fseek(s->pb, next, SEEK_SET);
-        continue;
+        return AVERROR(EAGAIN);
     }
     if ((flags & FLV_VIDEO_FRAMETYPE_MASK) == FLV_FRAME_KEY)
         av_add_index_entry(st, pos, dts, size, 0, AVINDEX_KEYFRAME);
@@ -420,7 +419,7 @@ static int flv_read_packet(AVFormatConte
         if (type == 0) {
             if ((ret = flv_get_extradata(s, st, size)) < 0)
                 return ret;
-            goto retry;
+            return AVERROR(EAGAIN);
         }
     }
 




More information about the ffmpeg-cvslog mailing list