[Ffmpeg-devel] [PATCH] vhook timestamps

Diego Biurrun diego
Thu Mar 29 07:24:54 CEST 2007


On Tue, Mar 27, 2007 at 02:42:42PM +0200, Michael Niedermayer wrote:
> 
> On Tue, Mar 27, 2007 at 08:41:27PM +0900, Bobby Bingham wrote:
> > Diego Biurrun wrote:
> > >On Tue, Mar 27, 2007 at 04:19:48PM +0900, Bobby Bingham wrote:
> > >>This patch changes 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.  I kept the units of 
> > >>the timestamps in nanoseconds to match what the fish filter currently 
> > >>expects.
> > >>
> > >>--- ffmpeg.orig/ffmpeg.c
> > >>+++ ffmpeg/ffmpeg.c
> > >>@@ -562,7 +562,7 @@ static void do_audio_out(AVFormatContext
> > >> 
> > >>-static void pre_process_video_frame(AVInputStream *ist, AVPicture 
> > >>*picture, void **bufp)
> > >>+static void pre_process_video_frame(AVInputStream *ist, AVPicture 
> > >>*picture, void **bufp, uint64_t pts)
> > >
> > >pts is uint64_t here ..
> > >
> > >>--- ffmpeg.orig/libavformat/framehook.c
> > >>+++ ffmpeg/libavformat/framehook.c
> > >>@@ -93,11 +93,10 @@ int frame_hook_add(int argc, char *argv[
> > >> 
> > >>-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)
> > >>--- ffmpeg.orig/libavformat/framehook.h
> > >>+++ ffmpeg/libavformat/framehook.h
> > >>@@ -46,7 +46,7 @@ typedef FrameHookRelease *FrameHookRelea
> > >> 
> > >>-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);
> > >
> > >.. but int64_t here ..
> > >
> > >Why?
> > 
> > Typo.  But it turns out the extra parameter to pre_process_video_frame 
> > wasn't needed in the first place.  Here's a patch to do the same thing 
> > without the extra parameter.
> 
> looks ok

Applied.

Diego




More information about the ffmpeg-devel mailing list