Fix printf()-like formats.

Fix formts for various GST_DEBUG et al. invocations. More precisely,
make size_t arguments use the %zu format specifier accordingly; force
XID formats to be a 32-bit unsigned integer; and fix the format used
for gst_vaapi_create_surface_with_format() error cases since we have
been using strings nowadays.
This commit is contained in:
Gwenole Beauchesne 2014-01-02 11:17:28 +01:00
parent 4902df0e40
commit 33bb859228
6 changed files with 8 additions and 8 deletions

View file

@ -101,7 +101,7 @@ push_buffer(GstVaapiDecoder *decoder, GstBuffer *buffer)
GST_BUFFER_FLAG_SET(buffer, GST_BUFFER_FLAG_EOS);
}
GST_DEBUG("queue encoded data buffer %p (%d bytes)",
GST_DEBUG("queue encoded data buffer %p (%zu bytes)",
buffer, gst_buffer_get_size(buffer));
g_async_queue_push(decoder->buffers, buffer);
@ -117,7 +117,7 @@ pop_buffer(GstVaapiDecoder *decoder)
if (!buffer)
return NULL;
GST_DEBUG("dequeue buffer %p for decoding (%d bytes)",
GST_DEBUG("dequeue buffer %p for decoding (%zu bytes)",
buffer, gst_buffer_get_size(buffer));
return buffer;

View file

@ -208,7 +208,7 @@ gst_vaapi_pixmap_x11_new(GstVaapiDisplay *display, GstVideoFormat format,
GstVaapiPixmap *
gst_vaapi_pixmap_x11_new_with_xid(GstVaapiDisplay *display, Pixmap xid)
{
GST_DEBUG("new pixmap from xid 0x%08x", xid);
GST_DEBUG("new pixmap from xid 0x%08x", (guint)xid);
g_return_val_if_fail(GST_VAAPI_IS_DISPLAY_X11(display), NULL);
g_return_val_if_fail(xid != None, NULL);

View file

@ -187,7 +187,7 @@ gst_vaapi_surface_create_with_format(GstVaapiSurface *surface,
/* ERRORS */
error_unsupported_format:
GST_ERROR("unsupported format %u", gst_vaapi_video_format_to_string(format));
GST_ERROR("unsupported format %s", gst_vaapi_video_format_to_string(format));
return FALSE;
#else
return FALSE;

View file

@ -400,7 +400,7 @@ gst_vaapi_window_glx_new_with_xid(GstVaapiDisplay *display, Window xid)
{
GstVaapiWindow *window;
GST_DEBUG("new window from xid 0x%08x", xid);
GST_DEBUG("new window from xid 0x%08x", (guint)xid);
g_return_val_if_fail(GST_VAAPI_IS_DISPLAY_GLX(display), NULL);
g_return_val_if_fail(xid != None, NULL);

View file

@ -626,7 +626,7 @@ gst_vaapi_window_x11_new(GstVaapiDisplay *display, guint width, guint height)
GstVaapiWindow *
gst_vaapi_window_x11_new_with_xid(GstVaapiDisplay *display, Window xid)
{
GST_DEBUG("new window from xid 0x%08x", xid);
GST_DEBUG("new window from xid 0x%08x", (guint)xid);
g_return_val_if_fail(GST_VAAPI_IS_DISPLAY_X11(display), NULL);
g_return_val_if_fail(xid != None, NULL);

View file

@ -122,7 +122,7 @@ gst_vaapiencode_default_allocate_buffer (GstVaapiEncode * encode,
/* ERRORS */
error_invalid_buffer:
{
GST_ERROR ("invalid GstVaapiCodedBuffer size (%d)", buf_size);
GST_ERROR ("invalid GstVaapiCodedBuffer size (%d bytes)", buf_size);
return GST_VAAPI_ENCODE_FLOW_MEM_ERROR;
}
error_create_buffer:
@ -202,7 +202,7 @@ gst_vaapiencode_push_frame (GstVaapiEncode * encode, gint64 timeout)
}
GST_VIDEO_ENCODER_STREAM_UNLOCK (encode);
GST_DEBUG ("output:%" GST_TIME_FORMAT ", size:%d",
GST_DEBUG ("output:%" GST_TIME_FORMAT ", size:%zu",
GST_TIME_ARGS (out_frame->pts), gst_buffer_get_size (out_buffer));
return gst_video_encoder_finish_frame (venc, out_frame);