Revision 387b4ac9

View differences:

ffplay.c
1755 1755

  
1756 1756
    link->w = c->width;
1757 1757
    link->h = c->height;
1758
    link->time_base = priv->is->video_st->time_base;
1758 1759

  
1759 1760
    return 0;
1760 1761
}
......
1791 1792
}
1792 1793

  
1793 1794
static int get_filtered_video_frame(AVFilterContext *ctx, AVFrame *frame,
1794
                                    int64_t *pts, int64_t *pos)
1795
                                    int64_t *pts, AVRational *tb, int64_t *pos)
1795 1796
{
1796 1797
    AVFilterBufferRef *pic;
1797 1798

  
......
1804 1805
    frame->opaque = pic;
1805 1806
    *pts          = pic->pts;
1806 1807
    *pos          = pic->pos;
1808
    *tb           = ctx->inputs[0]->time_base;
1807 1809

  
1808 1810
    memcpy(frame->data,     pic->data,     sizeof(frame->data));
1809 1811
    memcpy(frame->linesize, pic->linesize, sizeof(frame->linesize));
......
1882 1884
    for(;;) {
1883 1885
#if !CONFIG_AVFILTER
1884 1886
        AVPacket pkt;
1887
#else
1888
        AVRational tb;
1885 1889
#endif
1886 1890
        while (is->paused && !is->videoq.abort_request)
1887 1891
            SDL_Delay(10);
1888 1892
#if CONFIG_AVFILTER
1889
        ret = get_filtered_video_frame(filt_out, frame, &pts_int, &pos);
1893
        ret = get_filtered_video_frame(filt_out, frame, &pts_int, &tb, &pos);
1894

  
1895
        if (av_cmp_q(tb, is->video_st->time_base)) {
1896
            int64_t pts1 = pts_int;
1897
            pts_int = av_rescale_q(pts_int, tb, is->video_st->time_base);
1898
            av_log(NULL, AV_LOG_DEBUG, "video_thread(): "
1899
                   "tb:%d/%d pts:%"PRId64" -> tb:%d/%d pts:%"PRId64"\n",
1900
                   tb.num, tb.den, pts1,
1901
                   is->video_st->time_base.num, is->video_st->time_base.den, pts_int);
1902
        }
1890 1903
#else
1891 1904
        ret = get_video_frame(is, frame, &pts_int, &pkt);
1892 1905
#endif

Also available in: Unified diff