diff options
author | wm4 <wm4@nowhere> | 2015-03-20 22:07:26 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-03-20 22:08:12 +0100 |
commit | fe0c37b00715e17d84b524b0f6f57d910a82806d (patch) | |
tree | 8a0edfe4d8e8229d2bc324bb18fe276872ce85f2 /audio/decode | |
parent | 29083ae31bbe80c6f2459541335b801ced585627 (diff) | |
download | mpv-fe0c37b00715e17d84b524b0f6f57d910a82806d.tar.bz2 mpv-fe0c37b00715e17d84b524b0f6f57d910a82806d.tar.xz |
player: better handling of video with no timestamps
Trying to handle such video is almost worthless, but it was requested by
at least 2 users.
If there are no timestamps, enable byte seeking by setting
ts_resets_possible. Use the video FPS (wherever it comes from) and the
audio samplerate for timing. The latter was already done by making the
first packet emit DTS=0; remove this again and do it "properly" in a
higher level.
Diffstat (limited to 'audio/decode')
-rw-r--r-- | audio/decode/dec_audio.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/audio/decode/dec_audio.c b/audio/decode/dec_audio.c index ab4cd2ec55..c5ad97f7af 100644 --- a/audio/decode/dec_audio.c +++ b/audio/decode/dec_audio.c @@ -164,6 +164,9 @@ static int decode_new_frame(struct dec_audio *da) if (ret < 0) return ret; + if (da->pts == MP_NOPTS_VALUE && da->header->missing_timestamps) + da->pts = 0; + if (da->waiting) { da->pts_offset += da->waiting->samples; da->decode_format = *da->waiting; |