summaryrefslogtreecommitdiff
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
parentdc33e1e8a7557c82a943e4b096116775358449ca (diff)
downloadrockbox-1088f695a26563a589db736dccc403f0cb284354.tar.gz
rockbox-1088f695a26563a589db736dccc403f0cb284354.zip
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
-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 a7157538ea..f2196d548f 100644
--- a/apps/plugins/mpegplayer/mpegplayer.c
+++ b/apps/plugins/mpegplayer/mpegplayer.c
@@ -631,7 +631,9 @@ static void audio_thread(void)
631 631
632 if (!found_avdelay) { 632 if (!found_avdelay) {
633 if ((audio_str.first_pts != 0) && (video_str.first_pts != 0)) { 633 if ((audio_str.first_pts != 0) && (video_str.first_pts != 0)) {
634 avdelay = ((audio_str.first_pts - video_str.first_pts)*44100)/90000; 634 avdelay = audio_str.first_pts - video_str.first_pts;
635 avdelay *= 44100;
636 avdelay /= 90000;
635 found_avdelay = 1; 637 found_avdelay = 1;
636 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); 638 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);
637 } 639 }