diff options
author | Zhao Halley <halley.zhao@intel.com> | 2011-12-06 08:17:38 +0800 |
---|---|---|
committer | Thibault Saunier <thibault.saunier@collabora.com> | 2011-12-06 13:29:40 -0300 |
commit | 012c40140f827e3708c34cca3de569eeca14d38e (patch) | |
tree | 1f42c2a2e8e308ee8f121a3a1cfb68b10c9fa703 /gst-libs | |
parent | 391ecbda718de5f235aa31921a96c7e4af4fdb3f (diff) | |
download | gstreamer-plugins-bad-012c40140f827e3708c34cca3de569eeca14d38e.tar.gz |
codecparsers: fix < 0 issue of guint in mpeg4 parser
gst_byte_reader_masked_scan_uint32 returns a guint, not a gint, which
explains the issue we sometime get using < 0 instead of == -1;
Diffstat (limited to 'gst-libs')
-rw-r--r-- | gst-libs/gst/codecparsers/gstmpeg4parser.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gst-libs/gst/codecparsers/gstmpeg4parser.c b/gst-libs/gst/codecparsers/gstmpeg4parser.c index 09c522beb..30774e408 100644 --- a/gst-libs/gst/codecparsers/gstmpeg4parser.c +++ b/gst-libs/gst/codecparsers/gstmpeg4parser.c @@ -379,7 +379,7 @@ gst_mpeg4_next_resync (GstMpeg4Packet * packet, off1 = gst_byte_reader_masked_scan_uint32 (&br, mask, pattern, 0, size); - if (off1 < 0) + if (off1 == -1) return GST_MPEG4_PARSER_NO_PACKET; GST_DEBUG ("Resync code found at %i", off1); @@ -391,7 +391,7 @@ gst_mpeg4_next_resync (GstMpeg4Packet * packet, off2 = gst_byte_reader_masked_scan_uint32 (&br, mask, pattern, off1, size - off1); - if (off2 < 0) + if (off2 == -1) return GST_MPEG4_PARSER_NO_PACKET_END; packet->size = off1 - off2; @@ -451,7 +451,7 @@ gst_mpeg4_parse (GstMpeg4Packet * packet, gboolean skip_user_data, off1 = gst_byte_reader_masked_scan_uint32 (&br, 0xffffff00, 0x00000100, offset, size - offset); - if (off1 < 0) { + if (off1 == -1) { GST_DEBUG ("No start code prefix in this buffer"); return GST_MPEG4_PARSER_NO_PACKET; } @@ -471,7 +471,7 @@ find_end: off2 = gst_byte_reader_masked_scan_uint32 (&br, 0xffffff00, 0x00000100, off1 + 4, size - off1 - 4); - if (off2 < 0) { + if (off2 == -1) { GST_DEBUG ("Packet start %d, No end found", off1 + 4); packet->size = G_MAXUINT; @@ -519,7 +519,7 @@ gst_h263_parse (GstMpeg4Packet * packet, off1 = find_psc (&br); - if (off1 < 0) { + if (off1 == -1) { GST_DEBUG ("No start code prefix in this buffer"); return GST_MPEG4_PARSER_NO_PACKET; } @@ -529,7 +529,7 @@ gst_h263_parse (GstMpeg4Packet * packet, off2 = find_psc (&br); - if (off2 < 0) { + if (off2 == -1) { GST_DEBUG ("Packet start %d, No end found", off1); packet->size = G_MAXUINT; |