[FFmpeg-cvslog] avformat/rpl: Calculate the duration of the video track
Cameron Cawley
git at videolan.org
Fri Jul 5 21:53:26 EEST 2019
ffmpeg | branch: master | Cameron Cawley <ccawley2011 at gmail.com> | Sun Jun 30 00:00:44 2019 +0100| [0cbdedbd2fc2211d0477c32c30f12e7aad4443de] | committer: Michael Niedermayer
avformat/rpl: Calculate the duration of the video track
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0cbdedbd2fc2211d0477c32c30f12e7aad4443de
---
libavformat/rpl.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/rpl.c b/libavformat/rpl.c
index dbbcd13b41..17b45e3a67 100644
--- a/libavformat/rpl.c
+++ b/libavformat/rpl.c
@@ -269,8 +269,10 @@ static int rpl_read_header(AVFormatContext *s)
read_line_and_int(pb, &error); // (file index)
error |= read_line(pb, line, sizeof(line)); // offset to "helpful" sprite
error |= read_line(pb, line, sizeof(line)); // size of "helpful" sprite
- if (vst)
+ if (vst) {
error |= read_line(pb, line, sizeof(line)); // offset to key frame list
+ vst->duration = number_of_chunks * rpl->frames_per_chunk;
+ }
// Read the index
avio_seek(pb, chunk_catalog_offset, SEEK_SET);
More information about the ffmpeg-cvslog
mailing list