diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2009-03-01 03:48:35 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2009-03-01 03:48:35 +0000 |
commit | 4022fe01a680a8b7dbe3815785a90c12240be17a (patch) | |
tree | de6e3147adbb7443d278f9634ba446c5e74a487b /libavformat/raw.c | |
parent | 9e6c124a871f9b0c06081b6d2f11878cf6903924 (diff) | |
download | ffmpeg-4022fe01a680a8b7dbe3815785a90c12240be17a.tar.gz |
Change the timebase of the raw demuxer to one that can represent the ts of fields.
Originally committed as revision 17675 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/raw.c')
-rw-r--r-- | libavformat/raw.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/raw.c b/libavformat/raw.c index 5f66b07aa4..224c26f3ed 100644 --- a/libavformat/raw.c +++ b/libavformat/raw.c @@ -278,13 +278,14 @@ static int video_read_header(AVFormatContext *s, /* for MJPEG, specify frame rate */ /* for MPEG-4 specify it, too (most MPEG-4 streams do not have the fixed_vop_rate set ...)*/ if (ap->time_base.num) { - av_set_pts_info(st, 64, ap->time_base.num, ap->time_base.den); + st->codec->time_base= ap->time_base; } else if ( st->codec->codec_id == CODEC_ID_MJPEG || st->codec->codec_id == CODEC_ID_MPEG4 || st->codec->codec_id == CODEC_ID_DIRAC || st->codec->codec_id == CODEC_ID_H264) { - av_set_pts_info(st, 64, 1, 25); + st->codec->time_base= (AVRational){1,25}; } + av_set_pts_info(st, 64, 1, 1200000); return 0; } |