From 2bc75efbf35babf08a4a7ff5383ff16699e12bf1 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Thu, 13 Oct 2005 17:43:36 +0000 Subject: [PATCH] gst/elements/: fix some signedness Original commit message from CVS: * gst/elements/gstfakesrc.h: * gst/elements/gstfilesrc.c: (gst_file_src_create_read): * gst/elements/gsttypefindelement.c: fix some signedness * gst/elements/gstfilesink.c: (gst_file_sink_render): I wonder if this could actually write +2GB files before --- ChangeLog | 9 +++++++++ gst/elements/gstfakesrc.h | 2 +- gst/elements/gstfilesink.c | 3 ++- gst/elements/gstfilesrc.c | 3 ++- gst/elements/gsttypefindelement.c | 2 +- plugins/elements/gstfakesrc.h | 2 +- plugins/elements/gstfilesink.c | 3 ++- plugins/elements/gstfilesrc.c | 3 ++- plugins/elements/gsttypefindelement.c | 2 +- 9 files changed, 21 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3b58076..ec7c043 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2005-10-13 Thomas Vander Stichele + + * gst/elements/gstfakesrc.h: + * gst/elements/gstfilesrc.c: (gst_file_src_create_read): + * gst/elements/gsttypefindelement.c: + fix some signedness + * gst/elements/gstfilesink.c: (gst_file_sink_render): + I wonder if this could actually write +2GB files before + 2005-10-13 Andy Wingo * libs/gst/dataprotocol/dataprotocol.c (gst_dp_packet_from_caps): diff --git a/gst/elements/gstfakesrc.h b/gst/elements/gstfakesrc.h index 84fb0cc..0ea04c4 100644 --- a/gst/elements/gstfakesrc.h +++ b/gst/elements/gstfakesrc.h @@ -101,7 +101,7 @@ struct _GstFakeSrc { gboolean segment_loop; gint num_buffers; gint rt_num_buffers; /* we are going to change this at runtime */ - guint64 buffer_count; + gint64 buffer_count; gboolean silent; gboolean signal_handoffs; gboolean dump; diff --git a/gst/elements/gstfilesink.c b/gst/elements/gstfilesink.c index 6715258..1f58380 100644 --- a/gst/elements/gstfilesink.c +++ b/gst/elements/gstfilesink.c @@ -394,7 +394,8 @@ gst_file_sink_render (GstBaseSink * sink, GstBuffer * buffer) { GstFileSink *filesink; guint64 cur_pos; - guint size, back_pending = 0; + guint size; + guint64 back_pending = 0; size = GST_BUFFER_SIZE (buffer); diff --git a/gst/elements/gstfilesrc.c b/gst/elements/gstfilesrc.c index 9b18b09..ec15585 100644 --- a/gst/elements/gstfilesrc.c +++ b/gst/elements/gstfilesrc.c @@ -36,6 +36,7 @@ #include "gstfilesrc.h" #include +#include #include #include #ifdef HAVE_UNISTD_H @@ -731,7 +732,7 @@ gst_file_src_create_read (GstFileSrc * src, guint64 offset, guint length, goto could_not_read; /* regular files should have given us what we expected */ - if (ret < length && src->is_regular) + if ((gint) ret < length && src->is_regular) goto unexpected_eos; /* other files should eos if they read 0 */ diff --git a/gst/elements/gsttypefindelement.c b/gst/elements/gsttypefindelement.c index b0affd5..40637e0 100644 --- a/gst/elements/gsttypefindelement.c +++ b/gst/elements/gsttypefindelement.c @@ -371,7 +371,7 @@ gst_type_find_element_src_event (GstPad * pad, GstEvent * event) typedef struct { GstTypeFindFactory *factory; - gint probability; + guint probability; GstCaps *caps; guint requested_size; GstTypeFindElement *self; diff --git a/plugins/elements/gstfakesrc.h b/plugins/elements/gstfakesrc.h index 84fb0cc..0ea04c4 100644 --- a/plugins/elements/gstfakesrc.h +++ b/plugins/elements/gstfakesrc.h @@ -101,7 +101,7 @@ struct _GstFakeSrc { gboolean segment_loop; gint num_buffers; gint rt_num_buffers; /* we are going to change this at runtime */ - guint64 buffer_count; + gint64 buffer_count; gboolean silent; gboolean signal_handoffs; gboolean dump; diff --git a/plugins/elements/gstfilesink.c b/plugins/elements/gstfilesink.c index 6715258..1f58380 100644 --- a/plugins/elements/gstfilesink.c +++ b/plugins/elements/gstfilesink.c @@ -394,7 +394,8 @@ gst_file_sink_render (GstBaseSink * sink, GstBuffer * buffer) { GstFileSink *filesink; guint64 cur_pos; - guint size, back_pending = 0; + guint size; + guint64 back_pending = 0; size = GST_BUFFER_SIZE (buffer); diff --git a/plugins/elements/gstfilesrc.c b/plugins/elements/gstfilesrc.c index 9b18b09..ec15585 100644 --- a/plugins/elements/gstfilesrc.c +++ b/plugins/elements/gstfilesrc.c @@ -36,6 +36,7 @@ #include "gstfilesrc.h" #include +#include #include #include #ifdef HAVE_UNISTD_H @@ -731,7 +732,7 @@ gst_file_src_create_read (GstFileSrc * src, guint64 offset, guint length, goto could_not_read; /* regular files should have given us what we expected */ - if (ret < length && src->is_regular) + if ((gint) ret < length && src->is_regular) goto unexpected_eos; /* other files should eos if they read 0 */ diff --git a/plugins/elements/gsttypefindelement.c b/plugins/elements/gsttypefindelement.c index b0affd5..40637e0 100644 --- a/plugins/elements/gsttypefindelement.c +++ b/plugins/elements/gsttypefindelement.c @@ -371,7 +371,7 @@ gst_type_find_element_src_event (GstPad * pad, GstEvent * event) typedef struct { GstTypeFindFactory *factory; - gint probability; + guint probability; GstCaps *caps; guint requested_size; GstTypeFindElement *self; -- 2.7.4