comparison ffmdec.c @ 3438:40995a9455e3 libavformat

fix pts handling in ffm
author bcoudurier
date Sat, 07 Jun 2008 00:49:03 +0000
parents 82c4cc2aae2a
children 2d52ccde8f86
comparison
equal deleted inserted replaced
3437:82c4cc2aae2a 3438:40995a9455e3
230 230
231 static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap) 231 static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap)
232 { 232 {
233 FFMContext *ffm = s->priv_data; 233 FFMContext *ffm = s->priv_data;
234 AVStream *st; 234 AVStream *st;
235 FFMStream *fst;
236 ByteIOContext *pb = s->pb; 235 ByteIOContext *pb = s->pb;
237 AVCodecContext *codec; 236 AVCodecContext *codec;
238 int i, nb_streams; 237 int i, nb_streams;
239 uint32_t tag; 238 uint32_t tag;
240 239
261 char rc_eq_buf[128]; 260 char rc_eq_buf[128];
262 261
263 st = av_new_stream(s, 0); 262 st = av_new_stream(s, 0);
264 if (!st) 263 if (!st)
265 goto fail; 264 goto fail;
266 fst = av_mallocz(sizeof(FFMStream));
267 if (!fst)
268 goto fail;
269 s->streams[i] = st; 265 s->streams[i] = st;
270 266
271 av_set_pts_info(st, 64, 1, 1000000); 267 av_set_pts_info(st, 64, 1, 1000000);
272
273 st->priv_data = fst;
274 268
275 codec = st->codec; 269 codec = st->codec;
276 /* generic info */ 270 /* generic info */
277 codec->codec_id = get_be32(pb); 271 codec->codec_id = get_be32(pb);
278 codec->codec_type = get_byte(pb); /* codec_type */ 272 codec->codec_type = get_byte(pb); /* codec_type */