[vlc-devel] [PATCH 1/2] avcodec: encoder: init i_last_pts to VLC_TICK_INVALID

Alexandre Janniaux ajanni at videolabs.io
Thu Jan 21 14:12:46 UTC 2021


The value is currently only initialized by calloc().
---
 modules/codec/avcodec/encoder.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index 6636023b99..c5f5a28ee0 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -389,6 +389,7 @@ int InitVideoEnc( vlc_object_t *p_this )
     p_sys->i_samples_delay = 0;
     p_sys->p_codec = p_codec;
     p_sys->b_planar = false;
+    p_sys->i_last_pts = VLC_TICK_INVALID;
 
     p_sys->p_buffer = NULL;
     p_sys->p_interleave_buf = NULL;
-- 
2.30.0



More information about the vlc-devel mailing list