Do not give bogus timestamps for laced packets with no default duration. Patch by Uoti Urpala ( uoti ! urpala () pp1 ! inet ! fi ).

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18237 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
mosu 2006-04-24 06:28:45 +00:00
parent 1275cbfc4e
commit 558f53de4b
1 changed files with 4 additions and 0 deletions

View File

@ -3143,6 +3143,10 @@ handle_block (demuxer_t *demuxer, uint8_t *block, uint64_t length,
if (modified)
free (buffer);
dp->flags = (block_bref == 0 && block_fref == 0) ? 0x10 : 0;
/* If default_duration is 0, assume no pts value is known
* for packets after the first one (rather than all pts
* values being the same) */
if (i == 0 || track->default_duration)
dp->pts = mkv_d->last_pts + i * track->default_duration;
ds_add_packet (ds, dp);
}