|author||wm4 <wm4@nowhere>||2016-12-20 14:28:29 +0100|
|committer||wm4 <wm4@nowhere>||2016-12-20 14:28:29 +0100|
demux_mkv: trust keyframe flags for TrueHD
TrueHD is a fucked up audio codec with extremely small frame sizes. Some of these frames start with full headers, which are usually marked as keyframes, and from which decoding can be started (or at least that's what you'd expect). So for such tracks we should probably trust the keyframe flags. Doesn't really improve seek behavior, though.
1 files changed, 2 insertions, 1 deletions
diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c
index d127e517dc..ddda2ecb61 100644
@@ -1756,7 +1756,8 @@ static int demux_mkv_open_audio(demuxer_t *demuxer, mkv_track_t *track)
// Deal with some FFmpeg-produced garbage, and assume all audio codecs can
// start decoding from anywhere.
- track->require_keyframes = true;
+ if (strcmp(codec, "truehd") != 0)
+ track->require_keyframes = true;
sh_a->extradata = extradata;
sh_a->extradata_size = extradata_len;