return an error if we can not get a full packet,

fixes hang on EOF

Originally committed as revision 16740 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Stefan Gehrer 16 years ago
parent e0df9e4425
commit 1ac63c2a9b
  1. 4
      libavformat/iss.c

@ -112,8 +112,8 @@ static int iss_read_packet(AVFormatContext *s, AVPacket *pkt)
IssDemuxContext *iss = s->priv_data; IssDemuxContext *iss = s->priv_data;
int ret = av_get_packet(s->pb, pkt, iss->packet_size); int ret = av_get_packet(s->pb, pkt, iss->packet_size);
if(ret < 0) if(ret != iss->packet_size)
return ret; return AVERROR(EIO);
pkt->stream_index = 0; pkt->stream_index = 0;
pkt->pts = url_ftell(s->pb) - iss->sample_start_pos; pkt->pts = url_ftell(s->pb) - iss->sample_start_pos;

Loading…
Cancel
Save