[FFmpeg-cvslog] avformat/mov: Dont blindly trust the stream duration in seting chapter times
Michael Niedermayer
git at videolan.org
Fri May 23 05:10:18 CEST 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri May 23 04:39:55 2014 +0200| [64bf8455442b229f30fa293c927957fea116335f] | committer: Michael Niedermayer
avformat/mov: Dont blindly trust the stream duration in seting chapter times
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=64bf8455442b229f30fa293c927957fea116335f
---
libavformat/mov.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 26fb0ed..7f72db9 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -3303,6 +3303,11 @@ static void mov_read_chapters(AVFormatContext *s)
uint16_t ch;
int len, title_len;
+ if (end < sample->timestamp) {
+ av_log(s, AV_LOG_WARNING, "ignoring stream duration which is shorter than chapters\n");
+ end = AV_NOPTS_VALUE;
+ }
+
if (avio_seek(sc->pb, sample->pos, SEEK_SET) != sample->pos) {
av_log(s, AV_LOG_ERROR, "Chapter %d not found in file\n", i);
goto finish;
More information about the ffmpeg-cvslog
mailing list