Make use of the default duration for one frame if it is present in the file. This produces much smoother timecodes for laced audio frames. And I REALLY don't know why I missed that before...

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14059 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
mosu 2004-11-28 21:08:46 +00:00
parent a063b1bf18
commit 911e30b26f
1 changed files with 3 additions and 0 deletions

View File

@ -897,6 +897,8 @@ demux_mkv_read_trackvideo (demuxer_t *demuxer, mkv_track_t *track)
track->v_frate = num;
mp_msg (MSGT_DEMUX, MSGL_V, "[mkv] | + Frame rate: %f\n",
track->v_frate);
if (track->v_frate > 0)
track->default_duration = 1 / track->v_frate;
break;
}
@ -1095,6 +1097,7 @@ demux_mkv_read_trackentry (demuxer_t *demuxer)
else
{
track->v_frate = 1000000000.0 / num;
track->default_duration = num / 1000000000.0;
mp_msg (MSGT_DEMUX, MSGL_V, "[mkv] | + Default duration: "
"%.3fms ( = %.3f fps)\n",num/1000000.0,track->v_frate);
}