mpenkov / ffmpeg-tutorial

A set of tutorials that demonstrates how to write a video player based on FFmpeg
http://www.ffmpeg.org/documentation.html
1.22k stars 395 forks source link

tutorial7 - synchronize_audio #14

Open ghost opened 11 years ago

ghost commented 11 years ago

I noticed 2 problems about the function "synchronize_audio". 1) The parameter pts in never used. 2) In the block "else if(wanted_size > samples_size)", nb is computed as "nb = (samples_size - wanted_size)", thus the loop "while(nb > 0)" is never performed.

I tried to resample the result with "swr_convert", without success.

Thanks for your repository anyway.