Revision 7c8689ef

View differences:

ffmpeg.c
1469 1469
                                enc->frame_size = fifo_bytes / (2 * enc->channels);
1470 1470
                                av_fifo_generic_read(ost->fifo, samples, fifo_bytes, NULL);
1471 1471
                                ret = avcodec_encode_audio(enc, bit_buffer, bit_buffer_size, samples);
1472
                                pkt.duration = av_rescale((int64_t)enc->frame_size*ost->st->time_base.den,
1473
                                                          ost->st->time_base.num, enc->sample_rate);
1472 1474
                                enc->frame_size = fs_tmp;
1473 1475
                            }
1474 1476
                            if(ret <= 0) {

Also available in: Unified diff