Commit 6d576f62 authored by bcoudurier's avatar bcoudurier

set pkt duration for last smaller frame, should fix alac in m4a muxing

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18504 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 9f4f1dc7
......@@ -1469,6 +1469,8 @@ static int output_packet(AVInputStream *ist, int ist_index,
enc->frame_size = fifo_bytes / (2 * enc->channels);
av_fifo_generic_read(ost->fifo, samples, fifo_bytes, NULL);
ret = avcodec_encode_audio(enc, bit_buffer, bit_buffer_size, samples);
pkt.duration = av_rescale((int64_t)enc->frame_size*ost->st->time_base.den,
ost->st->time_base.num, enc->sample_rate);
enc->frame_size = fs_tmp;
}
if(ret <= 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment