From 67bad55414fb99320e1f392e091d18878edecd65 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 20 Jul 2013 02:16:46 +0200 Subject: demux_mkv: fix realaudio timestamps This fixes the sample RA_missing_timestamps.mkv. Pretty funny how this code got it almost right, but not quite, so it was broken all these years. And then, after everyone stopped caring, someone comes and fixes it. (By the way, I know absolutely nothing about realaudio.) --- demux/demux_mkv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c index a73c594371..408e69390a 100644 --- a/demux/demux_mkv.c +++ b/demux/demux_mkv.c @@ -2044,7 +2044,7 @@ static void handle_realaudio(demuxer_t *demuxer, mkv_track_t *track, apk_usize); /* Put timestamp only on packets that correspond to original * audio packets in file */ - dp->pts = (x * apk_usize % w) ? 0 : + dp->pts = (x * apk_usize % w) ? MP_NOPTS_VALUE : track->audio_timestamp[x * apk_usize / w]; dp->pos = track->audio_filepos; // all equal dp->keyframe = !x; // Mark first packet as keyframe @@ -2054,7 +2054,7 @@ static void handle_realaudio(demuxer_t *demuxer, mkv_track_t *track, } else { // Not a codec that requires reordering dp = new_demux_packet_from(buffer, size); if (track->ra_pts == mkv_d->last_pts && !mkv_d->a_skip_to_keyframe) - dp->pts = 0; + dp->pts = MP_NOPTS_VALUE; else dp->pts = mkv_d->last_pts; track->ra_pts = mkv_d->last_pts; -- cgit v1.2.3