diff options
author | Piotr Bandurski <ami_stuff@o2.pl> | 2012-11-21 17:28:44 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-21 23:52:20 +0100 |
commit | 88161b2a5287080b6d463439ebd0d8aecf0b4cf4 (patch) | |
tree | a6e76ab9fa18e14a0f6e11d06391b2d21a0b4611 /libavformat | |
parent | 9530439e5f0dbab97c6789c30fad1c03d59b58d7 (diff) | |
download | ffmpeg-88161b2a5287080b6d463439ebd0d8aecf0b4cf4.tar.gz |
siff: signal EOF
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/siff.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/siff.c b/libavformat/siff.c index 8e7e5c7cf0..a834d4d625 100644 --- a/libavformat/siff.c +++ b/libavformat/siff.c @@ -192,7 +192,7 @@ static int siff_read_packet(AVFormatContext *s, AVPacket *pkt) if (c->has_video){ if (c->cur_frame >= c->frames) - return AVERROR(EIO); + return AVERROR_EOF; if (c->curstrm == -1){ c->pktsize = avio_rl32(s->pb) - 4; c->flags = avio_rl16(s->pb); @@ -229,7 +229,9 @@ static int siff_read_packet(AVFormatContext *s, AVPacket *pkt) c->cur_frame++; }else{ size = av_get_packet(s->pb, pkt, c->block_align); - if(size <= 0) + if(!size) + return AVERROR_EOF; + if(size < 0) return AVERROR(EIO); pkt->duration = size; } |