summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-07-20 02:16:46 +0200
committerwm4 <wm4@nowhere>2013-07-20 02:16:46 +0200
commit67bad55414fb99320e1f392e091d18878edecd65 (patch)
tree1e59ea77bc78014e2402801be3c6bacc03ea2678
parent3dc063a3308e2f3e2a1a94f2a6b1c58e64a757bb (diff)
downloadmpv-67bad55414fb99320e1f392e091d18878edecd65.tar.bz2
mpv-67bad55414fb99320e1f392e091d18878edecd65.tar.xz
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.)
-rw-r--r--demux/demux_mkv.c4
1 files 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;