Skip to content

Commit

Permalink
Remove redundant calls
Browse files Browse the repository at this point in the history
  • Loading branch information
Asd-g committed Jun 2, 2024
1 parent 0ee8b12 commit f41e8d5
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 7 deletions.
2 changes: 0 additions & 2 deletions common/audio_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,6 @@ void lw_cleanup_audio_output_handler
lw_audio_output_handler_t *aohp
)
{
av_channel_layout_uninit(&aohp->output_channel_layout);
av_channel_layout_uninit(&aohp->input_channel_layout);
if( aohp->resampled_buffer )
av_freep( &aohp->resampled_buffer );
if( aohp->swr_ctx )
Expand Down
3 changes: 0 additions & 3 deletions common/libavsmash.c
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,6 @@ void update_configuration
AVChannelLayout extended_layout;
av_channel_layout_default(&extended_layout, ctx->ch_layout.nb_channels);
extended->channel_layout = extended_layout.u.mask;
av_channel_layout_uninit(&extended_layout);
}
extended->sample_rate = ctx->sample_rate;
extended->sample_format = ctx->sample_fmt;
Expand All @@ -1045,7 +1044,6 @@ void update_configuration
}
return;
fail:
av_channel_layout_uninit(&codecpar->ch_layout);
avcodec_parameters_free( &codecpar );
config->update_pending = 0;
config->delay_count = 0;
Expand Down Expand Up @@ -1157,7 +1155,6 @@ int initialize_decoder_configuration
++valid_index_count;
}
}
av_channel_layout_uninit(&prefer_layout);
lw_free( index_list );
/* Reinitialize decoder configuration at the first valid sample. */
for( uint32_t i = 1; get_sample( root, track_ID, i, config, &dummy ) < 0; i++ );
Expand Down
2 changes: 0 additions & 2 deletions common/resample.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ int resample_s32_to_s24( uint8_t **out_data, uint8_t *in_data, int data_size )

int flush_resampler_buffers(SwrContext *swr )
{
swr_close( swr );
return swr_init( swr ) < 0 ? -1 : 0;
}

Expand All @@ -66,7 +65,6 @@ int update_resampler_configuration(SwrContext *swr,
int *input_planes, int *input_block_align )
{
/* Reopen the resampler. */
swr_close( swr );
av_opt_set_chlayout( swr, "in_chlayout", in_channel_layout, 0 );
av_opt_set_sample_fmt( swr, "in_sample_fmt", in_sample_fmt, 0 );
av_opt_set_int( swr, "in_sample_rate", in_sample_rate, 0 );
Expand Down

0 comments on commit f41e8d5

Please sign in to comment.