File tree Expand file tree Collapse file tree
src/rust/src/libccxr_exports Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ use crate::ctorust::FromCType;
44use crate :: demuxer:: common_types:: CcxRational ;
55use crate :: demuxer:: demuxer_data:: DemuxerData ;
66use lib_ccxr:: common:: { BufferdataType , Codec } ;
7- use std:: os:: raw:: c_uchar;
87use std:: os:: raw:: { c_int, c_uint} ;
98
109/// Convert from C demuxer_data to Rust DemuxerData
@@ -254,8 +253,12 @@ mod tests {
254253 } ;
255254
256255 unsafe {
256+ let original_ptr = c_data. buffer ;
257257 copy_demuxer_data_from_rust ( & mut c_data, & rust_data) ;
258258
259+ // Verify the pointer was NOT reassigned (the bug we're fixing)
260+ assert_eq ! ( c_data. buffer, original_ptr) ;
261+
259262 // Verify all fields were copied correctly
260263 assert_eq ! ( c_data. program_number, rust_data. program_number) ;
261264 assert_eq ! ( c_data. stream_pid, rust_data. stream_pid) ;
You can’t perform that action at this time.
0 commit comments