This was a stupid mistake. We already take care of time_scale in av_set_pts_info(). Originally committed as revision 8333 to svn://svn.ffmpeg.org/ffmpeg/trunk