diff options
author | Yen Chi Hsuan <yan12125@gmail.com> | 2016-06-26 15:16:49 +0800 |
---|---|---|
committer | Yen Chi Hsuan <yan12125@gmail.com> | 2016-06-26 15:16:49 +0800 |
commit | 1143535d762fc4260aacc108f2c41079867f9f00 (patch) | |
tree | 2cb797f25191ad658652d5d963505462e6ec6833 /youtube_dl/utils.py | |
parent | 7d52c052efe7accf098bca84aef0ea70caa64889 (diff) |
[utils] Add urshift()
Used in IqiyiIE and LeIE
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r-- | youtube_dl/utils.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index a375282f2..a2cfb48a6 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -2899,3 +2899,7 @@ def parse_m3u8_attributes(attrib): val = val[1:-1] info[key] = val return info + + +def urshift(val, n): + return val >> n if val >= 0 else (val + 0x100000000) >> n |