projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make subtitle analysis depend on DCP standard.
[dcpomatic.git]
/
src
/
lib
/
ffmpeg.cc
diff --git
a/src/lib/ffmpeg.cc
b/src/lib/ffmpeg.cc
index 6ec368ef64f49b7fabf3788ac95a8f655ebdfd34..39abfe2b84ce71679cd66af9ac20a7d59a34d199 100644
(file)
--- a/
src/lib/ffmpeg.cc
+++ b/
src/lib/ffmpeg.cc
@@
-273,7
+273,11
@@
FFmpeg::subtitle_codec_context () const
int
FFmpeg::avio_read (uint8_t* buffer, int const amount)
{
int
FFmpeg::avio_read (uint8_t* buffer, int const amount)
{
- return _file_group.read (buffer, amount);
+ auto result = _file_group.read(buffer, amount);
+ if (result.eof && result.bytes_read == 0) {
+ return AVERROR_EOF;
+ }
+ return result.bytes_read;
}
}