Fix warnings in directdrawsink and directsoundsrc
authorРуслан Ижбулатов <lrn1986@gmail.com>
Fri, 30 Apr 2010 21:16:50 +0000 (01:16 +0400)
committerBenjamin Otte <otte@redhat.com>
Fri, 30 Apr 2010 22:04:55 +0000 (00:04 +0200)
Fixes #617331

sys/directdraw/gstdirectdrawsink.c
sys/directsound/gstdirectsoundsrc.c

index c00b36f..a84e6b0 100644 (file)
@@ -1486,6 +1486,7 @@ WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
               break;
             default:
               button = 4;
+              action = NULL;
           }
 
           x = LOWORD (lParam);
index c6064bb..54282f6 100644 (file)
@@ -329,7 +329,7 @@ dsound_open:
     DWORD err = GetLastError ();
     GST_ELEMENT_ERROR (dsoundsrc, RESOURCE, OPEN_READ,
         ("Unable to open dsound.dll"), (NULL));
-    g_print ("0x%x\n", HRESULT_FROM_WIN32 (err));
+    g_print ("0x%lx\n", HRESULT_FROM_WIN32 (err));
     return FALSE;
   }
 }
@@ -420,7 +420,7 @@ gst_directsound_src_prepare (GstAudioSrc * asrc, GstRingBufferSpec * spec)
   spec->bytes_per_sample = (spec->width / 8) * spec->channels;
   dsoundsrc->bytes_per_sample = spec->bytes_per_sample;
 
-  GST_DEBUG ("latency time: %llu - buffer time: %llu",
+  GST_DEBUG ("latency time: %" G_GUINT64_FORMAT " - buffer time: %" G_GUINT64_FORMAT,
       spec->latency_time, spec->buffer_time);
 
   /* Buffer-time should be allways more than 2*latency */
@@ -446,7 +446,7 @@ gst_directsound_src_prepare (GstAudioSrc * asrc, GstRingBufferSpec * spec)
 
   spec->segtotal = spec->width * (wfx.nAvgBytesPerSec / spec->segsize);
 
-  GST_DEBUG ("bytes/sec: %d, buffer size: %d, segsize: %d, segtotal: %d",
+  GST_DEBUG ("bytes/sec: %lu, buffer size: %d, segsize: %d, segtotal: %d",
       wfx.nAvgBytesPerSec,
       dsoundsrc->buffer_size, spec->segsize, spec->segtotal);