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/avienc.c | |
parent | 586bc7553ca90dee507afd950de64bbd2c6a80b5 (diff) | |
download | ffmpeg-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/avienc.c')
-rw-r--r-- | libavformat/avienc.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/libavformat/avienc.c b/libavformat/avienc.c index 2f36801bcb..f885d657a9 100644 --- a/libavformat/avienc.c +++ b/libavformat/avienc.c @@ -218,7 +218,7 @@ static int avi_write_header(AVFormatContext *s) nb_frames = 0; if(video_enc){ - put_le32(pb, (uint32_t)(int64_t_C(1000000) * FRAME_RATE_BASE / video_enc->frame_rate)); + put_le32(pb, (uint32_t)(int64_t_C(1000000) * video_enc->frame_rate_base / video_enc->frame_rate)); } else { put_le32(pb, 0); } @@ -244,8 +244,6 @@ static int avi_write_header(AVFormatContext *s) /* stream list */ for(i=0;i<n;i++) { - int gcd; - list2 = start_tag(pb, "LIST"); put_tag(pb, "strl"); @@ -262,10 +260,8 @@ static int avi_write_header(AVFormatContext *s) put_le16(pb, 0); /* language */ put_le32(pb, 0); /* initial frame */ - gcd= av_gcd(stream->frame_rate, FRAME_RATE_BASE); - - put_le32(pb, FRAME_RATE_BASE / gcd); /* scale */ - put_le32(pb, stream->frame_rate / gcd); /* rate */ + put_le32(pb, stream->frame_rate_base); /* scale */ + put_le32(pb, stream->frame_rate); /* rate */ put_le32(pb, 0); /* start */ avi->frames_hdr_strm[i] = url_ftell(pb); /* remember this offset to fill later */ |