diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-03-12 15:16:19 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-03-12 15:16:19 +0000 |
commit | 14bea432f16d7c66f9099e427819028b6b4c3bdc (patch) | |
tree | c52726ce14a0265337b9deebd2214e2552d284b0 /libavformat/raw.c | |
parent | 586bc7553ca90dee507afd950de64bbd2c6a80b5 (diff) | |
download | ffmpeg-streaming-14bea432f16d7c66f9099e427819028b6b4c3bdc.zip ffmpeg-streaming-14bea432f16d7c66f9099e427819028b6b4c3bdc.tar.gz |
per context frame_rate_base, this should finally fix frame_rate related av sync issues
Originally committed as revision 1666 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/raw.c')
-rw-r--r-- | libavformat/raw.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libavformat/raw.c b/libavformat/raw.c index f32f5eb..a1dcf87 100644 --- a/libavformat/raw.c +++ b/libavformat/raw.c @@ -61,7 +61,8 @@ static int raw_read_header(AVFormatContext *s, AVFormatParameters *ap) st->codec.channels = ap->channels; break; case CODEC_TYPE_VIDEO: - st->codec.frame_rate = ap->frame_rate; + st->codec.frame_rate = ap->frame_rate; + st->codec.frame_rate_base = ap->frame_rate_base; st->codec.width = ap->width; st->codec.height = ap->height; break; @@ -151,9 +152,11 @@ static int video_read_header(AVFormatContext *s, /* for mpeg4 specify it too (most mpeg4 streams dont have the fixed_vop_rate set ...)*/ if (st->codec.codec_id == CODEC_ID_MJPEG || st->codec.codec_id == CODEC_ID_MPEG4) { if (ap) { - st->codec.frame_rate = ap->frame_rate; + st->codec.frame_rate = ap->frame_rate; + st->codec.frame_rate_base = ap->frame_rate_base; } else { - st->codec.frame_rate = 25 * FRAME_RATE_BASE; + st->codec.frame_rate = 25; + st->codec.frame_rate_base = 1; } } return 0; |