diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2009-07-26 19:09:35 +0000 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2009-07-26 19:09:35 +0000 |
commit | 2078ca16eefda6ce23f129898f6097e40d9a97b4 (patch) | |
tree | 80b27a2095862c2bb86ad20b045cea228bfe7ecd /libavformat/asfdec.c | |
parent | a898cdc99592a6427ed6d6282f8a338165b1f40a (diff) | |
download | ffmpeg-2078ca16eefda6ce23f129898f6097e40d9a97b4.tar.gz |
Add handling of EAGAIN at packet boundaries. See "[PATCH] RTSP-MS 14/15:
ASF packet parsing" thread for discussion / reasoning.
Originally committed as revision 19509 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/asfdec.c')
-rw-r--r-- | libavformat/asfdec.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c index df39bb9857..0995b5aa82 100644 --- a/libavformat/asfdec.c +++ b/libavformat/asfdec.c @@ -609,6 +609,14 @@ static int ff_asf_get_packet(AVFormatContext *s, ByteIOContext *pb) } 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)); } |