Skip to content

Commit ff2925e

Browse files
committed
Problem in Copy to Rust and some typos that copilot review suggested
1 parent ddcdf5f commit ff2925e

File tree

4 files changed

+6
-18
lines changed

4 files changed

+6
-18
lines changed

src/lib_ccx/ccx_gxf.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,6 @@ static int parse_ad_vbi(struct ccx_demuxer *demux, int len, struct demuxer_data
951951
if (result != len)
952952
ret = CCX_EOF;
953953
return ret;
954-
// #endif
955954
}
956955

957956
static int parse_ad_field(struct ccx_demuxer *demux, int len, struct demuxer_data *data)

src/rust/src/common.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ use lib_ccxr::util::encoding::Encoding;
3434
use std::os::raw::{c_int, c_long};
3535
use std::path::PathBuf;
3636
use std::str::FromStr;
37+
use lib_ccxr::info;
3738

3839
pub trait FromC<T> {
3940
fn from_c(value: T) -> Self;
@@ -271,7 +272,7 @@ pub unsafe fn copy_to_rust(ccx_s_options: *const ccx_s_options) -> Options {
271272
(*ccx_s_options).extraction_start.hh as u8,
272273
(*ccx_s_options).extraction_start.mm as u8,
273274
(*ccx_s_options).extraction_start.ss as u8,
274-
(*ccx_s_options).extraction_start.time_in_ms as u16,
275+
0,
275276
)
276277
.expect("Invalid extraction start time"),
277278
),
@@ -280,7 +281,7 @@ pub unsafe fn copy_to_rust(ccx_s_options: *const ccx_s_options) -> Options {
280281
(*ccx_s_options).extraction_end.hh as u8,
281282
(*ccx_s_options).extraction_end.mm as u8,
282283
(*ccx_s_options).extraction_end.ss as u8,
283-
(*ccx_s_options).extraction_end.time_in_ms as u16,
284+
0,
284285
)
285286
.expect("Invalid extraction end time"),
286287
),

src/rust/src/demuxer/common_structs.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -115,18 +115,6 @@ impl Default for PSIBuffer {
115115
}
116116
}
117117

118-
impl PSIBuffer {
119-
#[allow(unused)] // used in tests
120-
pub(crate) fn default() -> PSIBuffer {
121-
PSIBuffer {
122-
prev_ccounter: 0,
123-
buffer: Box::into_raw(Box::new(0u8)),
124-
buffer_length: 0,
125-
ccounter: 0,
126-
}
127-
}
128-
}
129-
130118
pub struct PMTEntry {
131119
pub program_number: u32,
132120
pub elementary_pid: u32,

src/rust/src/file_functions/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/**
22
* Read from buffer if there is insufficient data then cache the buffer
33
*
4-
* @param ctx ccx_demuxer context properly initilaized ccx_demuxer with some input
5-
* Not to be NULL, since ctx is derefrenced inside this function
4+
* @param ctx ccx_demuxer context properly initialized ccx_demuxer with some input
5+
* Not to be NULL, since ctx is deferenced inside this function
66
*
7-
* @param buffer if buffer then it must be allocated to at;east bytes len as
7+
* @param buffer if buffer then it must be allocated to at least bytes len as
88
* passed in third argument, If buffer is NULL then those number of bytes
99
* are skipped from input.
1010
* @param bytes number of bytes to be read from file buffer.

0 commit comments

Comments
 (0)