summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshdown <shdownnine@gmail.com>2014-08-30 14:03:57 +0400
committerwm4 <wm4@nowhere>2014-08-30 15:15:37 +0200
commite2ecf3d03d5e5667fe7c28bee3c14c67eb447a5c (patch)
treef96c1b537b3315265efe17bd7eda1cf10feba42d
parentf49099b94d1b73a8b74da64d14ebd6f0e622f06b (diff)
downloadmpv-e2ecf3d03d5e5667fe7c28bee3c14c67eb447a5c.tar.bz2
mpv-e2ecf3d03d5e5667fe7c28bee3c14c67eb447a5c.tar.xz
demux_mkv: eliminate redundant branch
In the else branch pict_type is always 3, so pict_type != 3 is always false. (Note that I have no idea of what it was supposed to do and it is just an equivalent of the old behaviour.)
-rw-r--r--demux/demux_mkv.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c
index 5e2e0f904f..02efcb2a0a 100644
--- a/demux/demux_mkv.c
+++ b/demux/demux_mkv.c
@@ -1952,11 +1952,7 @@ static int64_t real_fix_timestamp(unsigned char *buf, int len, int64_t timestamp
*kf_base = timestamp;
*kf_pts = pts;
} else {
- if (pict_type != 3) {
- timestamp = *kf_base + ((pts - *kf_pts) & 0x1FFF);
- } else {
- timestamp = *kf_base - ((*kf_pts - pts) & 0x1FFF);
- }
+ timestamp = *kf_base - ((*kf_pts - pts) & 0x1FFF);
}
return timestamp;