[FFmpeg-cvslog] avcodec/mlpenc: analyze only if there are samples

Paul B Mahol git at videolan.org
Wed Sep 21 15:29:20 EEST 2022


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Sep 21 14:28:23 2022 +0200| [6a150fcdb917787b356b3b7eb87bfbe7d7a0e9d5] | committer: Paul B Mahol

avcodec/mlpenc: analyze only if there are samples

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6a150fcdb917787b356b3b7eb87bfbe7d7a0e9d5
---

 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)) {



More information about the ffmpeg-cvslog mailing list