[Ffmpeg-cvslog] r8541 - in trunk: ffmpeg.c libavformat/framehook.c libavformat/framehook.h

diego subversion
Thu Mar 29 07:24:36 CEST 2007


Author: diego
Date: Thu Mar 29 07:24:35 2007
New Revision: 8541

Modified:
   trunk/ffmpeg.c
   trunk/libavformat/framehook.c
   trunk/libavformat/framehook.h

Log:
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


Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c	(original)
+++ trunk/ffmpeg.c	Thu Mar 29 07:24:35 2007
@@ -601,7 +601,8 @@ static void pre_process_video_frame(AVIn
         picture2 = picture;
     }
 
-    frame_hook_process(picture2, dec->pix_fmt, dec->width, dec->height);
+    frame_hook_process(picture2, dec->pix_fmt, dec->width, dec->height,
+                       1000000 * ist->pts / AV_TIME_BASE);
 
     if (picture != picture2)
         *picture = *picture2;

Modified: trunk/libavformat/framehook.c
==============================================================================
--- trunk/libavformat/framehook.c	(original)
+++ trunk/libavformat/framehook.c	Thu Mar 29 07:24:35 2007
@@ -93,11 +93,10 @@ int frame_hook_add(int argc, char *argv[
 #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);

Modified: trunk/libavformat/framehook.h
==============================================================================
--- trunk/libavformat/framehook.h	(original)
+++ trunk/libavformat/framehook.h	Thu Mar 29 07:24:35 2007
@@ -46,7 +46,7 @@ typedef FrameHookRelease *FrameHookRelea
 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




More information about the ffmpeg-cvslog mailing list