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: default avatarJindrich Makovicka <>
Signed-off-by: default avatarAnton Khirnov <>
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