Skip to content

Commit

Permalink
avcodec/mlpenc: analyze only if there are samples
Browse files Browse the repository at this point in the history
  • Loading branch information
richardpl committed Sep 21, 2022
1 parent 2ca2d46 commit 6a150fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libavcodec/mlpenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2189,7 +2189,8 @@ static int mlp_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,

input_to_sample_buffer(ctx);

analyze_sample_buffer(ctx);
if (number_of_samples > 0)
analyze_sample_buffer(ctx);
}

if (ctx->frame_index == (ctx->max_restart_interval - 1)) {
Expand Down

0 comments on commit 6a150fc

Please sign in to comment.