summaryrefslogtreecommitdiff
path: root/apps/plugins/mpegplayer
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2007-03-30 23:58:12 +0000
committerDave Chapman <dave@dchapman.com>2007-03-30 23:58:12 +0000
commit1088f695a26563a589db736dccc403f0cb284354 (patch)
treec9c3a0183fcb3942002e55eeb3e32a2b3ee9cd1a /apps/plugins/mpegplayer
parentdc33e1e8a7557c82a943e4b096116775358449ca (diff)
downloadrockbox-1088f695a26563a589db736dccc403f0cb284354.zip
rockbox-1088f695a26563a589db736dccc403f0cb284354.tar.gz
rockbox-1088f695a26563a589db736dccc403f0cb284354.tar.bz2
rockbox-1088f695a26563a589db736dccc403f0cb284354.tar.xz
Another AV sync bugfix - the initial avdelay was being incorrectly calculated in some cases
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12975 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/mpegplayer')
-rw-r--r--apps/plugins/mpegplayer/mpegplayer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c
index a715753..f2196d5 100644
--- a/apps/plugins/mpegplayer/mpegplayer.c
+++ b/apps/plugins/mpegplayer/mpegplayer.c
@@ -631,7 +631,9 @@ static void audio_thread(void)
if (!found_avdelay) {
if ((audio_str.first_pts != 0) && (video_str.first_pts != 0)) {
- avdelay = ((audio_str.first_pts - video_str.first_pts)*44100)/90000;
+ avdelay = audio_str.first_pts - video_str.first_pts;
+ avdelay *= 44100;
+ avdelay /= 90000;
found_avdelay = 1;
DEBUGF("First Audio PTS = %u, First Video PTS=%u, A-V=%d samples\n",(unsigned int)audio_str.first_pts,(unsigned int)video_str.first_pts,avdelay);
}