Revision 4992d8bf

View differences:

ffmpeg.c
601 601
        picture2 = picture;
602 602
    }
603 603

  
604
    frame_hook_process(picture2, dec->pix_fmt, dec->width, dec->height);
604
    frame_hook_process(picture2, dec->pix_fmt, dec->width, dec->height,
605
                       1000000 * ist->pts / AV_TIME_BASE);
605 606

  
606 607
    if (picture != picture2)
607 608
        *picture = *picture2;
libavformat/framehook.c
93 93
#endif
94 94
}
95 95

  
96
void frame_hook_process(AVPicture *pict, enum PixelFormat pix_fmt, int width, int height)
96
void frame_hook_process(AVPicture *pict, enum PixelFormat pix_fmt, int width, int height, int64_t pts)
97 97
{
98 98
    if (first_hook) {
99 99
        FrameHookEntry *fhe;
100
        int64_t pts = av_gettime();
101 100

  
102 101
        for (fhe = first_hook; fhe; fhe = fhe->next) {
103 102
            fhe->Process(fhe->ctx, pict, pix_fmt, width, height, pts);
libavformat/framehook.h
46 46
extern FrameHookRelease Release;
47 47

  
48 48
extern int frame_hook_add(int argc, char *argv[]);
49
extern void frame_hook_process(struct AVPicture *pict, enum PixelFormat pix_fmt, int width, int height);
49
extern void frame_hook_process(struct AVPicture *pict, enum PixelFormat pix_fmt, int width, int height, int64_t pts);
50 50
extern void frame_hook_release(void);
51 51

  
52 52
#endif

Also available in: Unified diff