diff options
author | Jindrich Makovicka <jindrich.makovicka@nangu.tv> | 2011-03-31 16:58:50 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-03-31 19:46:28 +0200 |
commit | e006d71fa849542eb27146efac629288703b3d75 (patch) | |
tree | cba12341f69b37b7d3ec025e28afd3a0297d54fd /libavformat | |
parent | 1c69c79f2b11627cb50f1bc571de97ad8cbfefb7 (diff) | |
download | ffmpeg-streaming-e006d71fa849542eb27146efac629288703b3d75.zip ffmpeg-streaming-e006d71fa849542eb27146efac629288703b3d75.tar.gz |
mpegts: propagate avio EOF in read_packet()
Allows distinguishing between EOF and IO error in read_packet return code.
Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mpegts.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index abdb000..62e9dcb 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1350,7 +1350,7 @@ static int read_packet(AVFormatContext *s, uint8_t *buf, int raw_packet_size) for(;;) { len = avio_read(pb, buf, TS_PACKET_SIZE); if (len != TS_PACKET_SIZE) - return AVERROR(EIO); + return len < 0 ? len : AVERROR_EOF; /* check paquet sync byte */ if (buf[0] != 0x47) { /* find a new packet start */ |