Browse Source

avformat/rpl: Calculate the duration of the video track

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n4.2
Cameron Cawley Michael Niedermayer 6 years ago
parent
commit
0cbdedbd2f
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      libavformat/rpl.c

+ 3
- 1
libavformat/rpl.c View File

@@ -269,8 +269,10 @@ static int rpl_read_header(AVFormatContext *s)
read_line_and_int(pb, &error); // (file index) 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)); // offset to "helpful" sprite
error |= read_line(pb, line, sizeof(line)); // size of "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 error |= read_line(pb, line, sizeof(line)); // offset to key frame list
vst->duration = number_of_chunks * rpl->frames_per_chunk;
}


// Read the index // Read the index
avio_seek(pb, chunk_catalog_offset, SEEK_SET); avio_seek(pb, chunk_catalog_offset, SEEK_SET);


Loading…
Cancel
Save