diff options
author | Edward Hervey <bilboed@bilboed.com> | 2009-06-23 16:54:32 +0200 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2009-06-24 12:37:38 +0200 |
commit | ef02d1da1dfeae0782b3993adf7a4fe1f2e9d99b (patch) | |
tree | fbb29a727cb2fb824dd392ef58481f768eff2b1b /ext/raw1394/gsthdv1394src.c | |
parent | 279be9432175396943e900ea4d42b721fa6771c8 (diff) |
raw1394: sprinkle branch likeliness macros accross the code.
Diffstat (limited to 'ext/raw1394/gsthdv1394src.c')
-rw-r--r-- | ext/raw1394/gsthdv1394src.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/raw1394/gsthdv1394src.c b/ext/raw1394/gsthdv1394src.c index 54900bf7..8fd10a6e 100644 --- a/ext/raw1394/gsthdv1394src.c +++ b/ext/raw1394/gsthdv1394src.c @@ -314,10 +314,10 @@ gst_hdv1394src_iec61883_receive (unsigned char *data, int len, GST_LOG ("data:%p, len:%d, dropped:%d", data, len, dropped); /* error out if we don't have enough room ! */ - if (dv1394src->outoffset > (2048 * 188 - len)) + if (G_UNLIKELY (dv1394src->outoffset > (2048 * 188 - len))) return -1; - if (len == IEC61883_MPEG2_TSP_SIZE) { + if (G_LIKELY (len == IEC61883_MPEG2_TSP_SIZE)) { memcpy ((guint8 *) dv1394src->outdata + dv1394src->outoffset, data, len); dv1394src->outoffset += len; } @@ -408,12 +408,13 @@ gst_hdv1394src_create (GstPushSrc * psrc, GstBuffer ** buf) GST_LOG ("res:%d", res); - if (res < 0) { + if (G_UNLIKELY (res < 0)) { if (errno == EAGAIN || errno == EINTR) continue; else goto error_while_polling; } + if (G_UNLIKELY (pollfds[1].revents)) { char command; |