[vlc-commits] dummy vout: fix sign warning

Rémi Denis-Courmont git at videolan.org
Sat Feb 24 08:58:08 CET 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Feb 24 09:57:45 2018 +0200| [b1da4cddb2245879ef904663512c36189f79c142] | committer: Rémi Denis-Courmont

dummy vout: fix sign warning

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

 modules/video_output/vdummy.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/modules/video_output/vdummy.c b/modules/video_output/vdummy.c
index f8535ca536..2a57ad5037 100644
--- a/modules/video_output/vdummy.c
+++ b/modules/video_output/vdummy.c
@@ -145,12 +145,15 @@ static void Display(vout_display_t *vd, picture_t *picture, subpicture_t *subpic
 
 static void DisplayStat(vout_display_t *vd, picture_t *picture, subpicture_t *subpicture)
 {
+    plane_t *p = picture->p;
+
     VLC_UNUSED(vd);
     VLC_UNUSED(subpicture);
-    if ( vd->fmt.i_width*vd->fmt.i_height >= sizeof(mtime_t) &&
-         (picture->p->i_pitch * picture->p->i_lines) >= sizeof(mtime_t) ) {
+
+    if (vd->fmt.i_width * vd->fmt.i_height >= sizeof (mtime_t)
+     && (p->i_pitch * p->i_lines) >= (ssize_t)sizeof (mtime_t)) {
         mtime_t date;
-        memcpy(&date, picture->p->p_pixels, sizeof(date));
+        memcpy(&date, p->p_pixels, sizeof(date));
         msg_Dbg(vd, "VOUT got %"PRIu64" ms offset",
                 (mdate() - date) / 1000 );
     }



More information about the vlc-commits mailing list