[FFmpeg-cvslog] r19509 - trunk/libavformat/asfdec.c

rbultje subversion
Sun Jul 26 21:09:35 CEST 2009


Author: rbultje
Date: Sun Jul 26 21:09:35 2009
New Revision: 19509

Log:
Add handling of EAGAIN at packet boundaries. See "[PATCH] RTSP-MS 14/15:
ASF packet parsing" thread for discussion / reasoning.

Modified:
   trunk/libavformat/asfdec.c

Modified: trunk/libavformat/asfdec.c
==============================================================================
--- trunk/libavformat/asfdec.c	Sun Jul 26 14:20:04 2009	(r19508)
+++ trunk/libavformat/asfdec.c	Sun Jul 26 21:09:35 2009	(r19509)
@@ -609,6 +609,14 @@ static int ff_asf_get_packet(AVFormatCon
     }
 
     if (c != 0x82) {
+        /**
+         * This code allows handling of -EAGAIN at packet boundaries (i.e.
+         * if the packet sync code above triggers -EAGAIN). This does not
+         * imply complete -EAGAIN handling support at random positions in
+         * the stream.
+         */
+        if (url_ferror(pb) == AVERROR(EAGAIN))
+            return AVERROR(EAGAIN);
         if (!url_feof(pb))
             av_log(s, AV_LOG_ERROR, "ff asf bad header %x  at:%"PRId64"\n", c, url_ftell(pb));
     }



More information about the ffmpeg-cvslog mailing list