From 6a150fcdb917787b356b3b7eb87bfbe7d7a0e9d5 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Wed, 21 Sep 2022 14:28:23 +0200 Subject: [PATCH] avcodec/mlpenc: analyze only if there are samples --- libavcodec/mlpenc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/mlpenc.c b/libavcodec/mlpenc.c index b66f3a3067..73fdfc01cc 100644 --- a/libavcodec/mlpenc.c +++ b/libavcodec/mlpenc.c @@ -2189,7 +2189,8 @@ input_and_return: 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)) {