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
This commit is contained in:
Thomas Vander Stichele 2005-10-13 17:43:36 +00:00
parent a67c739837
commit 2bc75efbf3
9 changed files with 21 additions and 8 deletions

View file

@ -1,3 +1,12 @@
2005-10-13 Thomas Vander Stichele <thomas at apestaart dot org>
* 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 <wingo@pobox.com> 2005-10-13 Andy Wingo <wingo@pobox.com>
* libs/gst/dataprotocol/dataprotocol.c (gst_dp_packet_from_caps): * libs/gst/dataprotocol/dataprotocol.c (gst_dp_packet_from_caps):

View file

@ -101,7 +101,7 @@ struct _GstFakeSrc {
gboolean segment_loop; gboolean segment_loop;
gint num_buffers; gint num_buffers;
gint rt_num_buffers; /* we are going to change this at runtime */ gint rt_num_buffers; /* we are going to change this at runtime */
guint64 buffer_count; gint64 buffer_count;
gboolean silent; gboolean silent;
gboolean signal_handoffs; gboolean signal_handoffs;
gboolean dump; gboolean dump;

View file

@ -394,7 +394,8 @@ gst_file_sink_render (GstBaseSink * sink, GstBuffer * buffer)
{ {
GstFileSink *filesink; GstFileSink *filesink;
guint64 cur_pos; guint64 cur_pos;
guint size, back_pending = 0; guint size;
guint64 back_pending = 0;
size = GST_BUFFER_SIZE (buffer); size = GST_BUFFER_SIZE (buffer);

View file

@ -36,6 +36,7 @@
#include "gstfilesrc.h" #include "gstfilesrc.h"
#include <stdio.h> #include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
@ -731,7 +732,7 @@ gst_file_src_create_read (GstFileSrc * src, guint64 offset, guint length,
goto could_not_read; goto could_not_read;
/* regular files should have given us what we expected */ /* 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; goto unexpected_eos;
/* other files should eos if they read 0 */ /* other files should eos if they read 0 */

View file

@ -371,7 +371,7 @@ gst_type_find_element_src_event (GstPad * pad, GstEvent * event)
typedef struct typedef struct
{ {
GstTypeFindFactory *factory; GstTypeFindFactory *factory;
gint probability; guint probability;
GstCaps *caps; GstCaps *caps;
guint requested_size; guint requested_size;
GstTypeFindElement *self; GstTypeFindElement *self;

View file

@ -101,7 +101,7 @@ struct _GstFakeSrc {
gboolean segment_loop; gboolean segment_loop;
gint num_buffers; gint num_buffers;
gint rt_num_buffers; /* we are going to change this at runtime */ gint rt_num_buffers; /* we are going to change this at runtime */
guint64 buffer_count; gint64 buffer_count;
gboolean silent; gboolean silent;
gboolean signal_handoffs; gboolean signal_handoffs;
gboolean dump; gboolean dump;

View file

@ -394,7 +394,8 @@ gst_file_sink_render (GstBaseSink * sink, GstBuffer * buffer)
{ {
GstFileSink *filesink; GstFileSink *filesink;
guint64 cur_pos; guint64 cur_pos;
guint size, back_pending = 0; guint size;
guint64 back_pending = 0;
size = GST_BUFFER_SIZE (buffer); size = GST_BUFFER_SIZE (buffer);

View file

@ -36,6 +36,7 @@
#include "gstfilesrc.h" #include "gstfilesrc.h"
#include <stdio.h> #include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
@ -731,7 +732,7 @@ gst_file_src_create_read (GstFileSrc * src, guint64 offset, guint length,
goto could_not_read; goto could_not_read;
/* regular files should have given us what we expected */ /* 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; goto unexpected_eos;
/* other files should eos if they read 0 */ /* other files should eos if they read 0 */

View file

@ -371,7 +371,7 @@ gst_type_find_element_src_event (GstPad * pad, GstEvent * event)
typedef struct typedef struct
{ {
GstTypeFindFactory *factory; GstTypeFindFactory *factory;
gint probability; guint probability;
GstCaps *caps; GstCaps *caps;
guint requested_size; guint requested_size;
GstTypeFindElement *self; GstTypeFindElement *self;