File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ const CCX_DTVCC_SCREENGRID_ROWS: u8 = 75;
23
23
const CCX_DTVCC_SCREENGRID_COLUMNS : u8 = 210 ;
24
24
const CCX_DTVCC_MAX_ROWS : u8 = 15 ;
25
25
const CCX_DTVCC_MAX_COLUMNS : u8 = 32 * 2 ;
26
- const CCX_DTVCC_MAX_SERVICES : usize = 63 ;
26
+ pub const CCX_DTVCC_MAX_SERVICES : usize = 63 ;
27
27
28
28
/// Context required for processing 708 data
29
29
pub struct Dtvcc < ' a > {
@@ -234,9 +234,10 @@ impl<'a> Dtvcc<'a> {
234
234
let decoder = & mut self . decoders [ ( service_number - 1 ) as usize ]
235
235
. as_mut ( )
236
236
. unwrap ( ) ;
237
+ let encoder = & mut unsafe { self . encoder . read ( ) } ;
237
238
decoder. process_service_block (
238
239
& self . packet [ pos as usize ..( pos + block_length) as usize ] ,
239
- self . encoder ,
240
+ encoder,
240
241
self . timing ,
241
242
self . no_rollup ,
242
243
) ;
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ extern "C" fn ccxr_dtvcc_free(dtvcc_rust: *mut Dtvcc) {
104
104
continue ;
105
105
}
106
106
107
- let decoder = unsafe { & mut dtvcc. decoders [ i] . read ( ) } ;
107
+ let decoder = & mut dtvcc. decoders [ i] . to_owned ( ) . unwrap ( ) ;
108
108
109
109
decoder. windows . iter_mut ( ) . for_each ( |window| {
110
110
if utils:: is_false ( window. memory_reserved ) {
You can’t perform that action at this time.
0 commit comments