[FFmpeg-cvslog] lavf/bluray: translate a read of 0 to EOF
Jan Ekström
git at videolan.org
Thu May 10 18:00:54 EEST 2018
ffmpeg | branch: release/4.0 | Jan Ekström <jeebjp at gmail.com> | Sun May 6 17:15:52 2018 +0300| [8fde71acd9d1e28728f93bc7d170fa28455f7149] | committer: Jan Ekström
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.
(cherry picked from commit b995ec078f42bac95eda18fbd1b4387477b55d0d)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8fde71acd9d1e28728f93bc7d170fa28455f7149
---
libavformat/bluray.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/bluray.c b/libavformat/bluray.c
index 9282bf9956..635c4f1b87 100644
--- a/libavformat/bluray.c
+++ b/libavformat/bluray.c
@@ -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)
More information about the ffmpeg-cvslog
mailing list