Skip to content

Commit

Permalink
lavf/bluray: translate a read of 0 to EOF
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jeeb committed May 6, 2018
1 parent 053ee99 commit cc8e71f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libavformat/bluray.c
Expand Up @@ -198,7 +198,7 @@ static int bluray_read(URLContext *h, unsigned char *buf, int size)

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

return len;
return len == 0 ? AVERROR_EOF : len;
}

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

0 comments on commit cc8e71f

Please sign in to comment.