diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2019-05-17 14:36:12 +0200 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2019-05-17 14:36:12 +0200 |
commit | 74afc7de723f0e5a3d3ae93ccc775ef63c62b746 (patch) | |
tree | 566a4f255574c691d1c6444bee3900127b3e5b19 | |
parent | dc45d8ce2269e638c10a18f99aed3294fd5de827 (diff) | |
download | nihav-74afc7de723f0e5a3d3ae93ccc775ef63c62b746.tar.gz |
core/frame: use the same offsets for flipped frame
-rw-r--r-- | nihav-core/src/frame.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/nihav-core/src/frame.rs b/nihav-core/src/frame.rs index 6dfc5eb..ae6d92f 100644 --- a/nihav-core/src/frame.rs +++ b/nihav-core/src/frame.rs @@ -360,9 +360,7 @@ pub fn alloc_video_buffer(vinfo: NAVideoInfo, align: u8) -> Result<NABufferType, let ochr = fmt.get_chromaton(i); if ochr.is_none() { continue; } let chr = ochr.unwrap(); - if !vinfo.is_flipped() { - offs.push(new_size as usize); - } + offs.push(new_size as usize); let stride = chr.get_linesize(width); let cur_h = chr.get_height(height); let cur_sz = stride.checked_mul(cur_h); @@ -370,9 +368,6 @@ pub fn alloc_video_buffer(vinfo: NAVideoInfo, align: u8) -> Result<NABufferType, let new_sz = new_size.checked_add(cur_sz.unwrap()); if new_sz == None { return Err(AllocatorError::TooLargeDimensions); } new_size = new_sz.unwrap(); - if vinfo.is_flipped() { - offs.push(new_size as usize); - } strides.push(stride); } if max_depth <= 8 { |