xvmc: fix compiler warning
authorChristian König <deathsimple@vodafone.de>
Tue, 12 Apr 2011 19:51:41 +0000 (21:51 +0200)
committerChristian König <deathsimple@vodafone.de>
Tue, 12 Apr 2011 19:51:41 +0000 (21:51 +0200)
src/gallium/state_trackers/xorg/xvmc/surface.c

index 59840a1394edf0cd7a267eca7af7b999cf60ab7c..c8c8638e581e714a2cf76ff3dbf8d528e436fbfa 100644 (file)
@@ -467,8 +467,10 @@ Status XvMCPutSurface(Display *dpy, XvMCSurface *surface, Drawable drawable,
    if(dump_window) {
       static unsigned int framenum = 0;
       char cmd[256];
+
       sprintf(cmd, "xwd -id %d -out xvmc_frame_%08d.xwd", (int)drawable, ++framenum);
-      system(cmd);
+      if (system(cmd) != 0)
+         XVMC_MSG(XVMC_ERR, "[XvMC] Dumping surface %p failed.\n", surface);
    }
 
    XVMC_MSG(XVMC_TRACE, "[XvMC] Pushed surface %p to front buffer.\n", surface);