Revision 22c4c3e0

View differences:

ffmpeg.c
1465 1465
                            ret = 0;
1466 1466
                            /* encode any samples remaining in fifo */
1467 1467
                            if(fifo_bytes > 0 && enc->codec->capabilities & CODEC_CAP_SMALL_LAST_FRAME) {
1468
                                int osize = av_get_bits_per_sample_format(enc->sample_fmt) >> 3;
1468 1469
                                int fs_tmp = enc->frame_size;
1469
                                enc->frame_size = fifo_bytes / (2 * enc->channels);
1470
                                enc->frame_size = fifo_bytes / (osize * enc->channels);
1470 1471
                                av_fifo_generic_read(ost->fifo, samples, fifo_bytes, NULL);
1471 1472
                                ret = avcodec_encode_audio(enc, bit_buffer, bit_buffer_size, samples);
1472 1473
                                pkt.duration = av_rescale((int64_t)enc->frame_size*ost->st->time_base.den,

Also available in: Unified diff