Skip to content

Commit ff08c79

Browse files
cfsmp3claude
andcommitted
style: Fix formatting and clippy warnings
- Fix comment spacing (single space before //) - Mark is_two_byte_loop_marker as #[cfg(test)] since it's only used in tests 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent ac49bb5 commit ff08c79

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

src/lib_ccx/ccx_common_constants.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const unsigned char UTF8_BOM[] = {0xef, 0xbb, 0xbf};
1717
const unsigned char DVD_HEADER[8] = {0x00, 0x00, 0x01, 0xb2, 0x43, 0x43, 0x01, 0xf8};
1818
const unsigned char lc1[1] = {0x8a};
1919
const unsigned char lc2[1] = {0x8f};
20-
const unsigned char lc3[1] = {0x16}; // McPoodle uses single-byte loop markers
20+
const unsigned char lc3[1] = {0x16}; // McPoodle uses single-byte loop markers
2121
const unsigned char lc4[1] = {0x1e};
2222
const unsigned char lc5[1] = {0xff};
2323
const unsigned char lc6[1] = {0xfe};

src/lib_ccx/output.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ void writeDVDraw(const unsigned char *data1, int length1,
119119
struct cc_subtitle *sub)
120120
{
121121
/* these are only used by DVD raw mode: */
122-
static int loopcount = 1; /* loop 1: 5 elements, loop 2: 8 elements,
123-
loop 3: 11 elements, rest: 15 elements */
124-
static int datacount = 0; /* counts within loop */
122+
static int loopcount = 1; /* loop 1: 5 elements, loop 2: 8 elements,
123+
loop 3: 11 elements, rest: 15 elements */
124+
static int datacount = 0; /* counts within loop */
125125
static int waiting_for_field2 = 0; /* track if we're waiting for field 2 data */
126126

127127
/* printdata() is called separately for field 1 and field 2 data.
@@ -161,8 +161,8 @@ void writeDVDraw(const unsigned char *data1, int length1,
161161

162162
/* Check if we've completed a loop */
163163
int max_count = (loopcount == 1) ? 5 : (loopcount == 2) ? 8
164-
: (loopcount == 3) ? 11
165-
: 15;
164+
: (loopcount == 3) ? 11
165+
: 15;
166166
if (datacount >= max_count)
167167
{
168168
loopcount++;
@@ -193,8 +193,8 @@ void writeDVDraw(const unsigned char *data1, int length1,
193193
datacount++;
194194

195195
int max_count = (loopcount == 1) ? 5 : (loopcount == 2) ? 8
196-
: (loopcount == 3) ? 11
197-
: 15;
196+
: (loopcount == 3) ? 11
197+
: 15;
198198
if (datacount >= max_count)
199199
{
200200
loopcount++;

src/rust/src/demuxer/dvdraw.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ fn is_single_byte_loop_marker(byte: u8) -> bool {
8080
}
8181

8282
/// Checks if bytes form a 2-byte loop marker
83+
#[cfg(test)]
8384
fn is_two_byte_loop_marker(byte1: u8, byte2: u8) -> bool {
8485
(byte1 == LOOP_MARKER_3_FIRST || byte1 == LOOP_MARKER_4_FIRST) && byte2 == LOOP_MARKER_SECOND
8586
}

0 commit comments

Comments
 (0)