From fa26a29d6508e71e52abc6d71ee37279b837de37 Mon Sep 17 00:00:00 2001 From: Fabrice Bellard Date: Fri, 8 Aug 2003 17:52:30 +0000 Subject: add av_new_stream() usage Originally committed as revision 2109 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/ffm.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'libavformat/ffm.c') diff --git a/libavformat/ffm.c b/libavformat/ffm.c index de2ea6bef1..7eb3ca4e88 100644 --- a/libavformat/ffm.c +++ b/libavformat/ffm.c @@ -368,7 +368,7 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap) FFMStream *fst; ByteIOContext *pb = &s->pb; AVCodecContext *codec; - int i; + int i, nb_streams; uint32_t tag; /* header */ @@ -386,17 +386,15 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap) ffm->file_size = (uint64_t_C(1) << 63) - 1; } - s->nb_streams = get_be32(pb); + nb_streams = get_be32(pb); get_be32(pb); /* total bitrate */ /* read each stream */ - for(i=0;inb_streams;i++) { + for(i=0;icodec); - s->streams[i] = st; fst = av_mallocz(sizeof(FFMStream)); if (!fst) goto fail; @@ -611,7 +609,7 @@ offset_t ffm_read_write_index(int fd) read(fd, buf, 8); pos = 0; for(i=0;i<8;i++) - pos |= buf[i] << (56 - i * 8); + pos |= (int64_t)buf[i] << (56 - i * 8); return pos; } -- cgit v1.2.3