From: Ali Gholami Rudi Date: Wed, 21 Sep 2011 19:59:05 +0000 (+0330) Subject: av sync after seek commands X-Git-Url: https://repo.or.cz/w/fbff.git/commitdiff_plain/4fe3e07556e2220e3ef6fd2f07551f5496f4c33a av sync after seek commands --- diff --git a/README b/README index 689b9cd..68a9f6e 100644 --- a/README +++ b/README @@ -18,12 +18,11 @@ OPTION DESCRIPTION -R adjust the video to the right of the screen ============== ================================================ -The following table describes fbff keybinding. Most of these -commands accept a numerical prefix. The variable avdiff is -used to synchronize audio/video streams. The synchronization -is done after the pause command or the 's' key. '-', '+', and -'a' keys can be used to change the value of avdiff as explained -below. +The following table describes fbff keybinding. Most of these commands +accept a numerical prefix. The variable avdiff is used to synchronize +audioa and video streams. The synchronization is done after the 's' +key or the pause and seek commands. '-', '+', and 'a' keys can be used +to change the value of avdiff as explained below. ============== ================================================ KEY ACTION diff --git a/fbff.c b/fbff.c index d083bbd..6ed60f7 100644 --- a/fbff.c +++ b/fbff.c @@ -45,7 +45,7 @@ static int afd; /* oss fd */ static int vnum; /* decoded video frame count */ static int sync_diff; /* audio/video frame position diff */ -static int sync_cnt = 16; /* synchronization steps */ +static int sync_cnt = 32; /* synchronization steps */ static int sync_cur; /* synchronization steps left */ static void stroll(void) @@ -130,6 +130,7 @@ static void ffjmp(int n, int rel) struct ffs *ffs = video ? vffs : affs; long pos = ffs_pos(ffs, n); a_doreset(0); + sync_cur = sync_cnt; if (audio) ffs_seek(affs, pos, frame_jmp); if (video)