[FFmpeg-devel] [PATCH] af_aresample: Fix timestamp of first padded PCM audio packet

Michael Niedermayer michaelni at gmx.at
Fri Nov 15 12:07:15 CET 2013

On Thu, Nov 14, 2013 at 05:56:36PM -0800, Alex Sukhanov wrote:
> Problem: 
> ffmpeg generated video file which had two audio packets with the same timestamp: last original audio packet and first padded audio packet. 
> Timestamp of first added audio packet by 'apad' fitler had the same value as last original audio packet. The problem was in 'aresample' fitler, which used next pts instead of current one. 
> As long as 'apad' and 'aresample' filters have separate mechanisms of timestamp calculation, they got the same values.
> Command line: 
> ffmpeg -i <input_filename> -shortest -apad 512 -af asetnsamples=n=512 -b:a 1058400 -ac 1 -ar 44100 -async 0 -acodec pcm_s16le -sn -f matroska -y <output_file>
> Fix:
> Call swr_next_pts() function before swr_convert()
> Tested:
> FATE tests passed.
> Fix has been tested in our Transcoder regression framework on ~10k test videos. It's about ~500k transcodes.  



Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 2
"100% positive feedback" - "All either got their money back or didnt complain"
"Best seller ever, very honest" - "Seller refunded buyer after failed scam"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131115/00fced62/attachment.asc>

More information about the ffmpeg-devel mailing list