[vlc-commits] avcodec: encoder: init i_last_pts to VLC_TICK_INVALID

Alexandre Janniaux git at videolan.org
Mon Jan 25 11:37:37 UTC 2021


vlc | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Thu Jan 21 15:12:46 2021 +0100| [36a125ac7c8dcc861322148f9284e0738dea8b4e] | committer: Alexandre Janniaux

avcodec: encoder: init i_last_pts to VLC_TICK_INVALID

The value is currently only initialized by calloc().

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

 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;



More information about the vlc-commits mailing list