Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMPROVEMENT] Remove useless if statement #1175

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/ccextractor.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,9 @@ int api_start(struct ccx_s_options api_options)
case CCX_SM_GXF:
case CCX_SM_MXF:
#ifdef ENABLE_FFMPEG
case CCX_SM_FFMPEG:
case CCX_SM_FFMPEG:
#endif
if (!api_options.use_gop_as_pts) // If !0 then the user selected something
api_options.use_gop_as_pts = 0;
if (api_options.ignore_pts_jumps)
if (api_options.ignore_pts_jumps)
ccx_common_timing_settings.disable_sync_check = 1;
mprint("\rAnalyzing data in general mode\n");
tmp = general_loop(ctx);
Expand Down
4 changes: 2 additions & 2 deletions src/lib_ccx/es_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -643,9 +643,9 @@ static int gop_header(struct encoder_ctx *enc_ctx, struct lib_cc_decode *dec_ctx
dec_ctx->saw_gop_header = 1;

// If we use GOP timing, reconstruct the PTS from the GOP
if (ccx_options.use_gop_as_pts==1)
if (ccx_options.use_gop_as_pts == 1)
{
set_current_pts(dec_ctx->timing, gtc.ms*(MPEG_CLOCK_FREQ/1000));
set_current_pts(dec_ctx->timing, gtc.ms * (MPEG_CLOCK_FREQ/1000));
dec_ctx->timing->current_tref = 0;
frames_since_ref_time = 0;
set_fts(dec_ctx->timing);
Expand Down
4 changes: 2 additions & 2 deletions src/lib_ccx/sequencing.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ void store_hdcc(struct encoder_ctx *enc_ctx, struct lib_cc_decode *dec_ctx, unsi
seq_index = sequence_number - dec_ctx->anchor_seq_number + MAXBFRAMES;
}

dec_ctx->has_ccdata_buffered = 1;
dec_ctx->has_ccdata_buffered = 1;

// In GOP mode the fts is set only once for the whole GOP. Recreate
// the right time according to the sequence number.
if (ccx_options.use_gop_as_pts==1)
if (ccx_options.use_gop_as_pts == 1)
{
current_fts_now += (LLONG) (sequence_number*1000.0/current_fps);
}
Expand Down