changeset 1960:c0289552590f libavformat

Change the vhook code to send real timestamps to the filters instead of the current time of day, which is useless, and which the filters could just as easily query for themselves. patch by Bobby Bingham, uhmmmm gmail com
author diego
date Thu, 29 Mar 2007 05:24:35 +0000
parents 4e7e64bb5d3c
children 0bb1bfbaa031
files framehook.c framehook.h
diffstat 2 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/framehook.c	Wed Mar 28 15:45:24 2007 +0000
+++ b/framehook.c	Thu Mar 29 05:24:35 2007 +0000
@@ -93,11 +93,10 @@
 #endif
 }
 
-void frame_hook_process(AVPicture *pict, enum PixelFormat pix_fmt, int width, int height)
+void frame_hook_process(AVPicture *pict, enum PixelFormat pix_fmt, int width, int height, int64_t pts)
 {
     if (first_hook) {
         FrameHookEntry *fhe;
-        int64_t pts = av_gettime();
 
         for (fhe = first_hook; fhe; fhe = fhe->next) {
             fhe->Process(fhe->ctx, pict, pix_fmt, width, height, pts);
--- a/framehook.h	Wed Mar 28 15:45:24 2007 +0000
+++ b/framehook.h	Thu Mar 29 05:24:35 2007 +0000
@@ -46,7 +46,7 @@
 extern FrameHookRelease Release;
 
 extern int frame_hook_add(int argc, char *argv[]);
-extern void frame_hook_process(struct AVPicture *pict, enum PixelFormat pix_fmt, int width, int height);
+extern void frame_hook_process(struct AVPicture *pict, enum PixelFormat pix_fmt, int width, int height, int64_t pts);
 extern void frame_hook_release(void);
 
 #endif