Skip to content

Commit cc8e71f

Browse files
committed
lavf/bluray: translate a read of 0 to EOF
Yet another case of forgotten 0 =! EOF translation. The libbluray documentation specifically mentions that a read of 0 is EOF. Reported by Fyr on IRC.
1 parent 053ee99 commit cc8e71f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libavformat/bluray.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ static int bluray_read(URLContext *h, unsigned char *buf, int size)
198198

199199
len = bd_read(bd->bd, buf, size);
200200

201-
return len;
201+
return len == 0 ? AVERROR_EOF : len;
202202
}
203203

204204
static int64_t bluray_seek(URLContext *h, int64_t pos, int whence)

0 commit comments

Comments
 (0)