better rounding for audio_delay_fix in muxer_avi.c

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19932 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
ods15 2006-09-22 10:27:17 +00:00
parent a2d7d42a27
commit 978ec64191
1 changed files with 2 additions and 2 deletions

View File

@ -288,11 +288,11 @@ static void avifile_write_header(muxer_t *muxer){
for (i = 0; muxer->streams[i] && i < MUXER_MAX_STREAMS; ++i) {
muxer_stream_t *s = muxer->streams[i];
if (s->type == MUXER_TYPE_AUDIO && muxer->audio_delay_fix > 0.0) {
s->h.dwStart = muxer->audio_delay_fix * s->h.dwRate/s->h.dwScale;
s->h.dwStart = muxer->audio_delay_fix * s->h.dwRate/s->h.dwScale + 0.5;
mp_msg(MSGT_MUXER, MSGL_INFO, MSGTR_SettingAudioDelay, (float)s->h.dwStart * s->h.dwScale/s->h.dwRate);
}
if (s->type == MUXER_TYPE_VIDEO && muxer->audio_delay_fix < 0.0) {
s->h.dwStart = -muxer->audio_delay_fix * s->h.dwRate/s->h.dwScale;
s->h.dwStart = -muxer->audio_delay_fix * s->h.dwRate/s->h.dwScale + 0.5;
mp_msg(MSGT_MUXER, MSGL_INFO, MSGTR_SettingVideoDelay, (float)s->h.dwStart * s->h.dwScale/s->h.dwRate);
}
}