[FFmpeg-cvslog] r18504 - trunk/ffmpeg.c

bcoudurier subversion
Tue Apr 14 02:20:52 CEST 2009


Author: bcoudurier
Date: Tue Apr 14 02:20:52 2009
New Revision: 18504

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

Modified:
   trunk/ffmpeg.c

Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c	Tue Apr 14 02:12:54 2009	(r18503)
+++ trunk/ffmpeg.c	Tue Apr 14 02:20:52 2009	(r18504)
@@ -1469,6 +1469,8 @@ static int output_packet(AVInputStream *
                                 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) {



More information about the ffmpeg-cvslog mailing list