aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-01-13 14:04:11 -0500
committerJustin Ruggles <justin.ruggles@gmail.com>2012-03-03 17:03:26 -0500
commitd0ab58507480dde81c7127f1eea29e10f91eb4b6 (patch)
tree04e16a8ef0f6d81056096ecfe4af9a4e5cdf07c9 /libavformat
parent101c369b7cccc6a0c4fcbd4aec26894a5ffc74f7 (diff)
downloadffmpeg-d0ab58507480dde81c7127f1eea29e10f91eb4b6.tar.gz
vqf: set packet duration
Fixes timestamp calculation. The FATE reference is updated because timestamp calculations are now more accurate. Previous timestamps were based on average bit rate.
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/vqf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/vqf.c b/libavformat/vqf.c
index b9fa8be4f3..14085b9a52 100644
--- a/libavformat/vqf.c
+++ b/libavformat/vqf.c
@@ -201,7 +201,7 @@ static int vqf_read_header(AVFormatContext *s)
return -1;
}
c->frame_bit_len = st->codec->bit_rate*size/st->codec->sample_rate;
- avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
+ avpriv_set_pts_info(st, 64, size, st->codec->sample_rate);
/* put first 12 bytes of COMM chunk in extradata */
if (!(st->codec->extradata = av_malloc(12 + FF_INPUT_BUFFER_PADDING_SIZE)))
@@ -225,6 +225,7 @@ static int vqf_read_packet(AVFormatContext *s, AVPacket *pkt)
pkt->pos = avio_tell(s->pb);
pkt->stream_index = 0;
+ pkt->duration = 1;
pkt->data[0] = 8 - c->remaining_bits; // Number of bits to skip
pkt->data[1] = c->last_frame_bits;