Commit 88161b2a authored by Piotr Bandurski's avatar Piotr Bandurski Committed by Michael Niedermayer

siff: signal EOF

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 9530439e
...@@ -192,7 +192,7 @@ static int siff_read_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -192,7 +192,7 @@ static int siff_read_packet(AVFormatContext *s, AVPacket *pkt)
if (c->has_video){ if (c->has_video){
if (c->cur_frame >= c->frames) if (c->cur_frame >= c->frames)
return AVERROR(EIO); return AVERROR_EOF;
if (c->curstrm == -1){ if (c->curstrm == -1){
c->pktsize = avio_rl32(s->pb) - 4; c->pktsize = avio_rl32(s->pb) - 4;
c->flags = avio_rl16(s->pb); c->flags = avio_rl16(s->pb);
...@@ -229,7 +229,9 @@ static int siff_read_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -229,7 +229,9 @@ static int siff_read_packet(AVFormatContext *s, AVPacket *pkt)
c->cur_frame++; c->cur_frame++;
}else{ }else{
size = av_get_packet(s->pb, pkt, c->block_align); size = av_get_packet(s->pb, pkt, c->block_align);
if(size <= 0) if(!size)
return AVERROR_EOF;
if(size < 0)
return AVERROR(EIO); return AVERROR(EIO);
pkt->duration = size; pkt->duration = size;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment