Skip to content

Commit d664853

Browse files
committed
Switching over the encoder assignment based on DISABLE RUST
1 parent c83d88b commit d664853

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/lib_ccx/general_loop.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -900,8 +900,9 @@ int process_non_multiprogram_general_loop(struct lib_ccx_ctx *ctx,
900900
cinfo = get_cinfo(ctx->demux_ctx, pid);
901901
*enc_ctx = update_encoder_list_cinfo(ctx, cinfo);
902902
*dec_ctx = update_decoder_list_cinfo(ctx, cinfo);
903+
#ifdef DISABLE_RUST
903904
(*dec_ctx)->dtvcc->encoder = (void *)(*enc_ctx);
904-
#ifndef DISABLE_RUST
905+
#else
905906
ccxr_dtvcc_set_encoder((*dec_ctx)->dtvcc_rust, *enc_ctx);
906907
#endif
907908

@@ -1100,8 +1101,9 @@ int general_loop(struct lib_ccx_ctx *ctx)
11001101

11011102
enc_ctx = update_encoder_list_cinfo(ctx, cinfo);
11021103
dec_ctx = update_decoder_list_cinfo(ctx, cinfo);
1104+
#ifdef DISABLE_RUST
11031105
dec_ctx->dtvcc->encoder = (void *)enc_ctx; // WARN: otherwise cea-708 will not work
1104-
#ifndef DISABLE_RUST
1106+
#else
11051107
ccxr_dtvcc_set_encoder(dec_ctx->dtvcc_rust, (void *)enc_ctx);
11061108
#endif
11071109

@@ -1278,8 +1280,9 @@ int rcwt_loop(struct lib_ccx_ctx *ctx)
12781280
}
12791281

12801282
dec_ctx = update_decoder_list(ctx);
1283+
#ifdef DISABLE_RUST
12811284
dec_ctx->dtvcc->encoder = (void *)enc_ctx; // WARN: otherwise cea-708 will not work
1282-
#ifndef DISABLE_RUST
1285+
#else
12831286
ccxr_dtvcc_set_encoder(dec_ctx->dtvcc_rust, (void *)enc_ctx);
12841287
#endif
12851288
if (parsebuf[6] == 0 && parsebuf[7] == 2)

0 commit comments

Comments
 (0)