[vlc-commits] avcodec encoder: fix sign comparison issue

Jean-Baptiste Kempf git at videolan.org
Sat Nov 4 12:20:18 CET 2017


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Nov  4 11:15:52 2017 +0100| [8ee9d4d5a4a9499d1924eed8321fac720f8aaa80] | committer: Jean-Baptiste Kempf

avcodec encoder: fix sign comparison issue

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8ee9d4d5a4a9499d1924eed8321fac720f8aaa80
---

 modules/codec/avcodec/encoder.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index 9dff206b26..782662a663 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -1241,11 +1241,12 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
     return p_block;
 }
 
-static block_t *handle_delay_buffer( encoder_t *p_enc, encoder_sys_t *p_sys, int buffer_delay, block_t *p_aout_buf, int leftover_samples )
+static block_t *handle_delay_buffer( encoder_t *p_enc, encoder_sys_t *p_sys, unsigned int buffer_delay,
+                                     block_t *p_aout_buf, size_t leftover_samples )
 {
     block_t *p_block = NULL;
     //How much we need to copy from new packet
-    const int leftover = leftover_samples * p_sys->p_context->channels * p_sys->i_sample_bytes;
+    const size_t leftover = leftover_samples * p_sys->p_context->channels * p_sys->i_sample_bytes;
 
     av_frame_unref( p_sys->frame );
     p_sys->frame->format     = p_sys->p_context->sample_fmt;



More information about the vlc-commits mailing list