path: root/demux
diff options
authorwm4 <wm4@nowhere>2016-12-20 14:28:29 +0100
committerwm4 <wm4@nowhere>2016-12-20 14:28:29 +0100
commit99a4be4127a14fa757b1f39314d192c74a2a4722 (patch)
treee8da299e203d8d6d0fdc208d1f19f6993db31436 /demux
parent3b5777d86a62b9975c4c0fd224140e494db66ada (diff)
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.
Diffstat (limited to 'demux')
1 files changed, 2 insertions, 1 deletions
diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c
index d127e517dc..ddda2ecb61 100644
--- a/demux/demux_mkv.c
+++ b/demux/demux_mkv.c
@@ -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;