Mercurial > libavformat.hg
comparison raw.c @ 745:a03f1f7497ad libavformat
always honor the user specified frame rate if set
author | michael |
---|---|
date | Fri, 06 May 2005 14:19:17 +0000 |
parents | af4e24d6310c |
children | 1a19a6add674 |
comparison
equal
deleted
inserted
replaced
744:da5b3b9e898e | 745:a03f1f7497ad |
---|---|
233 st->codec.codec_id = s->iformat->value; | 233 st->codec.codec_id = s->iformat->value; |
234 st->need_parsing = 1; | 234 st->need_parsing = 1; |
235 | 235 |
236 /* for mjpeg, specify frame rate */ | 236 /* for mjpeg, specify frame rate */ |
237 /* for mpeg4 specify it too (most mpeg4 streams dont have the fixed_vop_rate set ...)*/ | 237 /* for mpeg4 specify it too (most mpeg4 streams dont have the fixed_vop_rate set ...)*/ |
238 if (st->codec.codec_id == CODEC_ID_MJPEG || | 238 if (ap && ap->time_base.num) { |
239 st->codec.codec_id == CODEC_ID_MPEG4) { | 239 av_set_pts_info(st, 64, ap->time_base.num, ap->time_base.den); |
240 if (ap && ap->time_base.num) { | 240 } else if ( st->codec.codec_id == CODEC_ID_MJPEG || |
241 av_set_pts_info(st, 64, ap->time_base.num, ap->time_base.den); | 241 st->codec.codec_id == CODEC_ID_MPEG4 || |
242 } else { | 242 st->codec.codec_id == CODEC_ID_H264) { |
243 av_set_pts_info(st, 64, 1, 25); | 243 av_set_pts_info(st, 64, 1, 25); |
244 } | 244 } |
245 } | 245 |
246 return 0; | 246 return 0; |
247 } | 247 } |
248 | 248 |
249 #define SEQ_START_CODE 0x000001b3 | 249 #define SEQ_START_CODE 0x000001b3 |
250 #define GOP_START_CODE 0x000001b8 | 250 #define GOP_START_CODE 0x000001b8 |