[FFmpeg-cvslog] avcodec/rka: do not output extra invalid samples in last frame

Paul B Mahol git at videolan.org
Thu Aug 31 00:01:10 EEST 2023


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Aug 30 23:00:37 2023 +0200| [7aa71ab5c04cbff9ed4eb7c2925ceb33a8e4e970] | committer: Paul B Mahol

avcodec/rka: do not output extra invalid samples in last frame

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

 libavcodec/rka.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/rka.c b/libavcodec/rka.c
index 7646d776be..92c1237d1f 100644
--- a/libavcodec/rka.c
+++ b/libavcodec/rka.c
@@ -949,6 +949,10 @@ static int rka_decode_frame(AVCodecContext *avctx, AVFrame *frame,
         }
     }
 
+    if (frame->nb_samples < s->frame_samples &&
+        frame->nb_samples > s->last_nb_samples)
+        frame->nb_samples = s->last_nb_samples;
+
     *got_frame_ptr = 1;
 
     return avpkt->size;



More information about the ffmpeg-cvslog mailing list