1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00

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.
This commit is contained in:
Justin Ruggles 2012-01-13 14:04:11 -05:00
parent 101c369b7c
commit d0ab585074
2 changed files with 3 additions and 2 deletions

View File

@ -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;

View File

@ -1 +1 @@
178a10705baabc5b82bd79240f38a700
d72fb75fb22f4bcc94a1dc7af5356ec1