Commit e006d71f authored by Jindrich Makovicka's avatar Jindrich Makovicka Committed by Anton Khirnov

mpegts: propagate avio EOF in read_packet()

Allows distinguishing between EOF and IO error in read_packet return code.
Signed-off-by: 's avatarJindrich Makovicka <makovick@gmail.com>
Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent 1c69c79f
......@@ -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 */
......
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