aboutsummaryrefslogtreecommitdiff
path: root/modules/pdp_ffmpeg~.c
diff options
context:
space:
mode:
authorN.N. <sevyves@users.sourceforge.net>2005-01-02 06:02:50 +0000
committerN.N. <sevyves@users.sourceforge.net>2005-01-02 06:02:50 +0000
commit304d25a2828076188afbd32757f5a67009ed866b (patch)
treeafce5fc762fee332916fb5cb4d9e874c95860c52 /modules/pdp_ffmpeg~.c
parenta9cfc5852d75ca1c62e4c97e3334c99ee2f2f9a8 (diff)
PiDiP 0.12.18
svn path=/trunk/externals/pidip/; revision=2440
Diffstat (limited to 'modules/pdp_ffmpeg~.c')
-rw-r--r--modules/pdp_ffmpeg~.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/pdp_ffmpeg~.c b/modules/pdp_ffmpeg~.c
index 3e229af..fec1c35 100644
--- a/modules/pdp_ffmpeg~.c
+++ b/modules/pdp_ffmpeg~.c
@@ -322,6 +322,7 @@ static void pdp_ffmpeg_process_yv12(t_pdp_ffmpeg *x)
t_int framebytes;
t_int owidth, oheight;
short *pencbuf;
+ t_int framerate, atime, ttime;
/* allocate all ressources */
if ( ((int)header->info.image.width != x->x_vwidth) ||
@@ -391,12 +392,12 @@ static void pdp_ffmpeg_process_yv12(t_pdp_ffmpeg *x)
x->x_secondcount[ j ] = 0;
}
}
- if ( x->x_secondcount[ svideoindex ] >= (x->x_avcontext->streams[i]->codec.frame_rate/10000) )
+ framerate = x->x_avcontext->streams[i]->codec.frame_rate/10000;
+ ttime = ( ( x->x_nbframes + 1 ) % framerate ) * ( 1000 / framerate );
+ atime = ( etime.tv_usec / 1000 );
+ // post("pdp_theonice~ : actual : %d, theoretical : %d", atime, ttime );
+ if ( atime < ttime )
{
- // post("pdp_ffmpeg : index=%d actual : %d, nominal : %d",
- // svideoindex,
- // x->x_secondcount[ svideoindex ],
- // (x->x_avcontext->streams[i]->codec.frame_rate/10000) );
x->x_nbframes_dropped++;
continue;
}