Mercurial > libavformat.hg
comparison utils.c @ 2223:824d41f03283 libavformat
remove unused functions
author | mru |
---|---|
date | Sat, 07 Jul 2007 13:46:25 +0000 |
parents | da71207a7cf1 |
children | 639597604897 |
comparison
equal
deleted
inserted
replaced
2222:3427d0c63a32 | 2223:824d41f03283 |
---|---|
1004 ie->flags = flags; | 1004 ie->flags = flags; |
1005 | 1005 |
1006 return index; | 1006 return index; |
1007 } | 1007 } |
1008 | 1008 |
1009 /** | |
1010 * build an index for raw streams using a parser. | |
1011 */ | |
1012 static void av_build_index_raw(AVFormatContext *s) | |
1013 { | |
1014 AVPacket pkt1, *pkt = &pkt1; | |
1015 int ret; | |
1016 AVStream *st; | |
1017 | |
1018 st = s->streams[0]; | |
1019 av_read_frame_flush(s); | |
1020 url_fseek(&s->pb, s->data_offset, SEEK_SET); | |
1021 | |
1022 for(;;) { | |
1023 ret = av_read_frame(s, pkt); | |
1024 if (ret < 0) | |
1025 break; | |
1026 if (pkt->stream_index == 0 && st->parser && | |
1027 (pkt->flags & PKT_FLAG_KEY)) { | |
1028 av_add_index_entry(st, st->parser->frame_offset, pkt->dts, | |
1029 0, 0, AVINDEX_KEYFRAME); | |
1030 } | |
1031 av_free_packet(pkt); | |
1032 } | |
1033 } | |
1034 | |
1035 /** | |
1036 * Returns TRUE if we deal with a raw stream. | |
1037 * | |
1038 * Raw codec data and parsing needed. | |
1039 */ | |
1040 static int is_raw_stream(AVFormatContext *s) | |
1041 { | |
1042 AVStream *st; | |
1043 | |
1044 if (s->nb_streams != 1) | |
1045 return 0; | |
1046 st = s->streams[0]; | |
1047 if (!st->need_parsing) | |
1048 return 0; | |
1049 return 1; | |
1050 } | |
1051 | |
1052 int av_index_search_timestamp(AVStream *st, int64_t wanted_timestamp, | 1009 int av_index_search_timestamp(AVStream *st, int64_t wanted_timestamp, |
1053 int flags) | 1010 int flags) |
1054 { | 1011 { |
1055 AVIndexEntry *entries= st->index_entries; | 1012 AVIndexEntry *entries= st->index_entries; |
1056 int nb_entries= st->nb_index_entries; | 1013 int nb_entries= st->nb_index_entries; |