Mercurial > libavformat.hg
comparison utils.c @ 979:d2e5dfdf4def libavformat
add size to AVIndex
| author | michael |
|---|---|
| date | Wed, 01 Mar 2006 11:29:55 +0000 |
| parents | 5e15da09cd6b |
| children | 2d57ce58f576 |
comparison
equal
deleted
inserted
replaced
| 978:c168be36dbba | 979:d2e5dfdf4def |
|---|---|
| 1129 * Add a index entry into a sorted list updateing if it is already there. | 1129 * Add a index entry into a sorted list updateing if it is already there. |
| 1130 * | 1130 * |
| 1131 * @param timestamp timestamp in the timebase of the given stream | 1131 * @param timestamp timestamp in the timebase of the given stream |
| 1132 */ | 1132 */ |
| 1133 int av_add_index_entry(AVStream *st, | 1133 int av_add_index_entry(AVStream *st, |
| 1134 int64_t pos, int64_t timestamp, int distance, int flags) | 1134 int64_t pos, int64_t timestamp, int size, int distance, int flags) |
| 1135 { | 1135 { |
| 1136 AVIndexEntry *entries, *ie; | 1136 AVIndexEntry *entries, *ie; |
| 1137 int index; | 1137 int index; |
| 1138 | 1138 |
| 1139 if((unsigned)st->nb_index_entries + 1 >= UINT_MAX / sizeof(AVIndexEntry)) | 1139 if((unsigned)st->nb_index_entries + 1 >= UINT_MAX / sizeof(AVIndexEntry)) |
| 1166 } | 1166 } |
| 1167 | 1167 |
| 1168 ie->pos = pos; | 1168 ie->pos = pos; |
| 1169 ie->timestamp = timestamp; | 1169 ie->timestamp = timestamp; |
| 1170 ie->min_distance= distance; | 1170 ie->min_distance= distance; |
| 1171 ie->size= size; | |
| 1171 ie->flags = flags; | 1172 ie->flags = flags; |
| 1172 | 1173 |
| 1173 return index; | 1174 return index; |
| 1174 } | 1175 } |
| 1175 | 1176 |
| 1191 if (ret < 0) | 1192 if (ret < 0) |
| 1192 break; | 1193 break; |
| 1193 if (pkt->stream_index == 0 && st->parser && | 1194 if (pkt->stream_index == 0 && st->parser && |
| 1194 (pkt->flags & PKT_FLAG_KEY)) { | 1195 (pkt->flags & PKT_FLAG_KEY)) { |
| 1195 av_add_index_entry(st, st->parser->frame_offset, pkt->dts, | 1196 av_add_index_entry(st, st->parser->frame_offset, pkt->dts, |
| 1196 0, AVINDEX_KEYFRAME); | 1197 0, 0, AVINDEX_KEYFRAME); |
| 1197 } | 1198 } |
| 1198 av_free_packet(pkt); | 1199 av_free_packet(pkt); |
| 1199 } | 1200 } |
| 1200 } | 1201 } |
| 1201 | 1202 |
