Revision a351110e

View differences:

libavformat/c93.c
89 89
    video->codec->height = 192;
90 90
    /* 4:3 320x200 with 8 empty lines */
91 91
    video->sample_aspect_ratio = (AVRational) { 5, 6 };
92
    video->time_base = (AVRational) { 2, 25 };
92
    av_set_pts_info(video, 64, 2, 25);
93 93
    video->nb_frames = framecount;
94 94
    video->duration = framecount;
95 95
    video->start_time = 0;
libavformat/oggparsedirac.c
42 42
    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
43 43
    st->codec->codec_id = CODEC_ID_DIRAC;
44 44
    // dirac in ogg always stores timestamps as though the video were interlaced
45
    st->time_base = (AVRational){st->codec->time_base.num, 2*st->codec->time_base.den};
45
    av_set_pts_info(st, 64, st->codec->time_base.num, 2*st->codec->time_base.den);
46 46
    return 1;
47 47
}
48 48

  
......
79 79

  
80 80
    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
81 81
    st->codec->codec_id = CODEC_ID_DIRAC;
82
    st->time_base.den = AV_RB32(buf+8);
83
    st->time_base.num = AV_RB32(buf+12);
82
    av_set_pts_info(st, 64, AV_RB32(buf+12), AV_RB32(buf+8));
84 83
    return 1;
85 84
}
86 85

  
libavformat/oggparseflac.c
65 65
        memcpy(st->codec->extradata, streaminfo_start, FLAC_STREAMINFO_SIZE);
66 66
        st->codec->extradata_size = FLAC_STREAMINFO_SIZE;
67 67

  
68
        st->time_base.num = 1;
69
        st->time_base.den = st->codec->sample_rate;
68
        av_set_pts_info(st, 64, 1, st->codec->sample_rate);
70 69
    } else if (mdt == FLAC_METADATA_TYPE_VORBIS_COMMENT) {
71 70
        ff_vorbis_comment (s, &st->metadata, os->buf + os->pstart + 4, os->psize - 4);
72 71
    }
libavformat/oggparseogm.c
83 83
            st->codec->height = bytestream_get_le32(&p);
84 84
            st->codec->time_base.den = spu * 10000000;
85 85
            st->codec->time_base.num = time_unit;
86
            st->time_base = st->codec->time_base;
86
            av_set_pts_info(st, 64, st->codec->time_base.num, st->codec->time_base.den);
87 87
        } else {
88 88
            st->codec->channels = bytestream_get_le16(&p);
89 89
            p += 2;                 /* block_align */
90 90
            st->codec->bit_rate = bytestream_get_le32(&p) * 8;
91 91
            st->codec->sample_rate = spu * 10000000 / time_unit;
92
            st->time_base.num = 1;
93
            st->time_base.den = st->codec->sample_rate;
92
            av_set_pts_info(st, 64, 1, st->codec->sample_rate);
94 93
        }
95 94
    } else if (*p == 3) {
96 95
        if (os->psize > 8)
libavformat/oggparseskeleton.c
60 60
        start_den = AV_RL64(buf+20);
61 61

  
62 62
        if (start_den) {
63
            av_reduce(&start_time, &st->time_base.den, start_num, start_den, INT_MAX);
64
            st->time_base.num = 1;
63
            int64_t base_den;
64
            av_reduce(&start_time, &base_den, start_num, start_den, INT_MAX);
65
            av_set_pts_info(st, 64, 1, base_den);
65 66
            os->lastpts =
66 67
            st->start_time = start_time;
67 68
        }
libavformat/oggparsespeex.c
72 72
                                         + FF_INPUT_BUFFER_PADDING_SIZE);
73 73
        memcpy(st->codec->extradata, p, st->codec->extradata_size);
74 74

  
75
        st->time_base.num = 1;
76
        st->time_base.den = st->codec->sample_rate;
75
        av_set_pts_info(st, 64, 1, st->codec->sample_rate);
77 76
    } else
78 77
        ff_vorbis_comment(s, &st->metadata, p, os->psize);
79 78

  
libavformat/oggparsetheora.c
91 91
            st->codec->time_base.num = 1;
92 92
            st->codec->time_base.den = 25;
93 93
        }
94
        st->time_base = st->codec->time_base;
94
        av_set_pts_info(st, 64, st->codec->time_base.num, st->codec->time_base.den);
95 95

  
96 96
        st->sample_aspect_ratio.num = get_bits_long(&gb, 24);
97 97
        st->sample_aspect_ratio.den = get_bits_long(&gb, 24);
libavformat/oggparsevorbis.c
252 252

  
253 253
        if (srate > 0) {
254 254
            st->codec->sample_rate = srate;
255
            st->time_base.num = 1;
256
            st->time_base.den = srate;
255
            av_set_pts_info(st, 64, 1, srate);
257 256
        }
258 257
    } else if (os->buf[os->pstart] == 3) {
259 258
        if (os->psize > 8 &&

Also available in: Unified diff