diff options
author | 2004-11-28 21:08:46 +0000 | |
---|---|---|
committer | 2004-11-28 21:08:46 +0000 | |
commit | 911e30b26f6c180e274716e78ce21ca6fdf9683a (patch) | |
tree | 764c9264f96edb6681d5cce7c1bfcb0317b66e03 | |
parent | a063b1bf185212492882613d2a8908456932aa53 (diff) |
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
-rw-r--r-- | libmpdemux/demux_mkv.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libmpdemux/demux_mkv.c b/libmpdemux/demux_mkv.c index 233b76a0aa..46660d06f3 100644 --- a/libmpdemux/demux_mkv.c +++ b/libmpdemux/demux_mkv.c @@ -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); } |