summaryrefslogtreecommitdiff
path: root/libavformat/vc1testenc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/vc1testenc.c')
-rw-r--r--libavformat/vc1testenc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/vc1testenc.c b/libavformat/vc1testenc.c
index 507b332a86..06431dae17 100644
--- a/libavformat/vc1testenc.c
+++ b/libavformat/vc1testenc.c
@@ -55,11 +55,14 @@ static int vc1test_write_packet(AVFormatContext *s, AVPacket *pkt)
{
RCVContext *ctx = s->priv_data;
ByteIOContext *pb = s->pb;
+ uint32_t pts = av_rescale(pkt->pts,
+ 1000 * (uint64_t)s->streams[0]->time_base.num,
+ s->streams[0]->time_base.den);
if (!pkt->size)
return 0;
put_le32(pb, pkt->size | ((pkt->flags & AV_PKT_FLAG_KEY) ? 0x80000000 : 0));
- put_le32(pb, pkt->pts);
+ put_le32(pb, pts);
put_buffer(pb, pkt->data, pkt->size);
put_flush_packet(pb);
ctx->frames++;