diff --git a/src/internal.rs b/src/internal.rs index 567d0848c..b8fe283c7 100644 --- a/src/internal.rs +++ b/src/internal.rs @@ -734,7 +734,6 @@ impl Rav1dTaskContext_task_thread { #[repr(C)] pub(crate) struct Rav1dTaskContext { - pub f: *mut Rav1dFrameData, pub ts: *mut Rav1dTileState, pub bx: c_int, pub by: c_int, @@ -762,12 +761,8 @@ pub(crate) struct Rav1dTaskContext { } impl Rav1dTaskContext { - pub(crate) unsafe fn new( - f: *mut Rav1dFrameData, - task_thread: Arc, - ) -> Self { + pub(crate) unsafe fn new(task_thread: Arc) -> Self { Self { - f, ts: ptr::null_mut(), bx: 0, by: 0, diff --git a/src/lib.rs b/src/lib.rs index 2cc8fa91e..c0b36cd05 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -354,7 +354,7 @@ pub(crate) unsafe fn rav1d_open(c_out: &mut *mut Rav1dContext, s: &Rav1dSettings } else { Rav1dContextTaskThread { task: Rav1dContextTaskType::Single(Mutex::new(Box::new( - Rav1dTaskContext::new(&mut *((*c).fc).offset(0), Arc::clone(&thread_data)), + Rav1dTaskContext::new(Arc::clone(&thread_data)), ))), thread_data, } diff --git a/src/thread_task.rs b/src/thread_task.rs index 9e58f54ed..500776d9c 100644 --- a/src/thread_task.rs +++ b/src/thread_task.rs @@ -790,10 +790,7 @@ unsafe fn delayed_fg_task<'l, 'ttd: 'l>( } pub unsafe fn rav1d_worker_task(c: &Rav1dContext, task_thread: Arc) { - let mut tc = Rav1dTaskContext::new( - &mut *((*c).fc).offset(0) as *mut Rav1dFrameData, - task_thread, - ); + let mut tc = Rav1dTaskContext::new(task_thread); // We clone the Arc here for the lifetime of this function to avoid an // immutable borrow of tc across the call to park @@ -1016,7 +1013,6 @@ pub unsafe fn rav1d_worker_task(c: &Rav1dContext, task_thread: Arc