Mercurial > libavformat.hg
comparison matroskadec.c @ 3782:b0ab5575a1bc libavformat
matroskadec: index timestamps are supposed to be in the timebase of the stream
author | aurel |
---|---|
date | Tue, 26 Aug 2008 20:32:27 +0000 |
parents | f4eb5cc927f9 |
children | fd49d42b918f |
comparison
equal
deleted
inserted
replaced
3781:b7bd38b16272 | 3782:b0ab5575a1bc |
---|---|
1335 MatroskaTrack *track = matroska_find_track_by_num(matroska, | 1335 MatroskaTrack *track = matroska_find_track_by_num(matroska, |
1336 pos[j].track); | 1336 pos[j].track); |
1337 if (track && track->stream) | 1337 if (track && track->stream) |
1338 av_add_index_entry(track->stream, | 1338 av_add_index_entry(track->stream, |
1339 pos[j].pos + matroska->segment_start, | 1339 pos[j].pos + matroska->segment_start, |
1340 index[i].time*matroska->time_scale/AV_TIME_BASE, | 1340 index[i].time, 0, 0, AVINDEX_KEYFRAME); |
1341 0, 0, AVINDEX_KEYFRAME); | |
1342 } | 1341 } |
1343 } | 1342 } |
1344 | 1343 |
1345 return 0; | 1344 return 0; |
1346 } | 1345 } |
1625 blocks[i].duration, !blocks[i].reference); | 1624 blocks[i].duration, !blocks[i].reference); |
1626 key_frame |= res > 0; | 1625 key_frame |= res > 0; |
1627 } | 1626 } |
1628 if (key_frame) | 1627 if (key_frame) |
1629 av_add_index_entry(matroska->vstream, pos, | 1628 av_add_index_entry(matroska->vstream, pos, |
1630 cluster.timecode*matroska->time_scale/AV_TIME_BASE, | 1629 cluster.timecode, 0, 0, AVINDEX_KEYFRAME); |
1631 0, 0, AVINDEX_KEYFRAME); | |
1632 ebml_free(matroska_cluster, &cluster); | 1630 ebml_free(matroska_cluster, &cluster); |
1633 if (res < 0) matroska->done = 1; | 1631 if (res < 0) matroska->done = 1; |
1634 return res; | 1632 return res; |
1635 } | 1633 } |
1636 | 1634 |