[FFmpeg-cvslog] avplay: Do not print a possibly uninitialized value

Luca Barbato git at videolan.org
Thu Apr 30 22:30:08 CEST 2015


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Tue Apr 28 21:24:27 2015 +0200| [06f4b1e37a08f3fd269ecbfeb0181129e5bfc86e] | committer: Luca Barbato

avplay: Do not print a possibly uninitialized value

Initialize `diff` to 0.

Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

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

 avplay.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/avplay.c b/avplay.c
index 98fd954..5e5518e 100644
--- a/avplay.c
+++ b/avplay.c
@@ -1033,7 +1033,7 @@ static void stream_pause(VideoState *is)
 
 static double compute_target_time(double frame_current_pts, VideoState *is)
 {
-    double delay, sync_threshold, diff;
+    double delay, sync_threshold, diff = 0;
 
     /* compute nominal delay */
     delay = frame_current_pts - is->frame_last_pts;



More information about the ffmpeg-cvslog mailing list