Skip to content

Commit

Permalink
Switching over the encoder assignment based on DISABLE RUST
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchitBhonsle committed Apr 10, 2023
1 parent 125e740 commit e42fe35
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/lib_ccx/general_loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -900,8 +900,9 @@ int process_non_multiprogram_general_loop(struct lib_ccx_ctx *ctx,
cinfo = get_cinfo(ctx->demux_ctx, pid);
*enc_ctx = update_encoder_list_cinfo(ctx, cinfo);
*dec_ctx = update_decoder_list_cinfo(ctx, cinfo);
#ifdef DISABLE_RUST
(*dec_ctx)->dtvcc->encoder = (void *)(*enc_ctx);
#ifndef DISABLE_RUST
#else
ccxr_dtvcc_set_encoder((*dec_ctx)->dtvcc_rust, *enc_ctx);
#endif

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

enc_ctx = update_encoder_list_cinfo(ctx, cinfo);
dec_ctx = update_decoder_list_cinfo(ctx, cinfo);
#ifdef DISABLE_RUST
dec_ctx->dtvcc->encoder = (void *)enc_ctx; // WARN: otherwise cea-708 will not work
#ifndef DISABLE_RUST
#else
ccxr_dtvcc_set_encoder(dec_ctx->dtvcc_rust, (void *)enc_ctx);
#endif

Expand Down Expand Up @@ -1278,8 +1280,9 @@ int rcwt_loop(struct lib_ccx_ctx *ctx)
}

dec_ctx = update_decoder_list(ctx);
#ifdef DISABLE_RUST
dec_ctx->dtvcc->encoder = (void *)enc_ctx; // WARN: otherwise cea-708 will not work
#ifndef DISABLE_RUST
#else
ccxr_dtvcc_set_encoder(dec_ctx->dtvcc_rust, (void *)enc_ctx);
#endif
if (parsebuf[6] == 0 && parsebuf[7] == 2)
Expand Down

0 comments on commit e42fe35

Please sign in to comment.