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 > {
@@ -233,9 +233,10 @@ impl<'a> Dtvcc<'a> {
233
233
let decoder = & mut self . decoders [ ( service_number - 1 ) as usize ]
234
234
. as_mut ( )
235
235
. unwrap ( ) ;
236
+ let encoder = & mut unsafe { self . encoder . read ( ) } ;
236
237
decoder. process_service_block (
237
238
& self . packet [ pos as usize ..( pos + block_length) as usize ] ,
238
- self . encoder ,
239
+ encoder,
239
240
self . timing ,
240
241
self . no_rollup ,
241
242
) ;
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ extern "C" fn ccxr_dtvcc_free(dtvcc_rust: *mut Dtvcc) {
77
77
continue ;
78
78
}
79
79
80
- let decoder = unsafe { & mut dtvcc. decoders [ i] . read ( ) } ;
80
+ let decoder = & mut dtvcc. decoders [ i] . to_owned ( ) . unwrap ( ) ;
81
81
82
82
decoder. windows . iter_mut ( ) . for_each ( |window| {
83
83
if utils:: is_false ( window. memory_reserved ) {
You can’t perform that action at this time.
0 commit comments