Commit 7b2d1b8d authored by aurel's avatar aurel

move timecode calculation out of laces loop

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@8359 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 1b624816
...@@ -2552,18 +2552,18 @@ matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data, int size, ...@@ -2552,18 +2552,18 @@ matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data, int size,
if (res == 0) { if (res == 0) {
int real_v = matroska->tracks[track]->flags & MATROSKA_TRACK_REAL_V; int real_v = matroska->tracks[track]->flags & MATROSKA_TRACK_REAL_V;
for (n = 0; n < laces; n++) {
uint64_t timecode = AV_NOPTS_VALUE; uint64_t timecode = AV_NOPTS_VALUE;
if (cluster_time != (uint64_t)-1 && cluster_time + block_time >= 0)
timecode = cluster_time + block_time;
for (n = 0; n < laces; n++) {
int slice, slices = 1; int slice, slices = 1;
if (real_v) { if (real_v) {
slices = *data++ + 1; slices = *data++ + 1;
lace_size[n]--; lace_size[n]--;
} }
if (cluster_time != (uint64_t)-1 && n == 0) {
if (cluster_time + block_time >= 0)
timecode = cluster_time + block_time;
}
/* FIXME: duration */ /* FIXME: duration */
for (slice=0; slice<slices; slice++) { for (slice=0; slice<slices; slice++) {
...@@ -2595,6 +2595,8 @@ matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data, int size, ...@@ -2595,6 +2595,8 @@ matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data, int size,
matroska_queue_packet_reordered(matroska, pkt, is_bframe); matroska_queue_packet_reordered(matroska, pkt, is_bframe);
else else
matroska_queue_packet(matroska, pkt); matroska_queue_packet(matroska, pkt);
timecode = AV_NOPTS_VALUE;
} }
data += lace_size[n]; data += lace_size[n];
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment