Commit e1ec7aa0 authored by diego's avatar diego

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


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@8541 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent af8f6d3a
...@@ -601,7 +601,8 @@ static void pre_process_video_frame(AVInputStream *ist, AVPicture *picture, void ...@@ -601,7 +601,8 @@ static void pre_process_video_frame(AVInputStream *ist, AVPicture *picture, void
picture2 = picture; 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) if (picture != picture2)
*picture = *picture2; *picture = *picture2;
......
...@@ -93,11 +93,10 @@ int frame_hook_add(int argc, char *argv[]) ...@@ -93,11 +93,10 @@ int frame_hook_add(int argc, char *argv[])
#endif #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) { if (first_hook) {
FrameHookEntry *fhe; FrameHookEntry *fhe;
int64_t pts = av_gettime();
for (fhe = first_hook; fhe; fhe = fhe->next) { for (fhe = first_hook; fhe; fhe = fhe->next) {
fhe->Process(fhe->ctx, pict, pix_fmt, width, height, pts); fhe->Process(fhe->ctx, pict, pix_fmt, width, height, pts);
......
...@@ -46,7 +46,7 @@ typedef FrameHookRelease *FrameHookReleaseFn; ...@@ -46,7 +46,7 @@ typedef FrameHookRelease *FrameHookReleaseFn;
extern FrameHookRelease Release; extern FrameHookRelease Release;
extern int frame_hook_add(int argc, char *argv[]); 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); extern void frame_hook_release(void);
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment