Mercurial > libavformat.hg
comparison rtpenc_xiph.c @ 6354:c0bd24801ac1 libavformat
rtpenc_xiph: Don't needlessly cast pointers to integers
author | mstorsjo |
---|---|
date | Mon, 09 Aug 2010 10:23:26 +0000 |
parents | 93c7a56fa912 |
children | 3aa7765383b5 |
comparison
equal
deleted
inserted
replaced
6353:3f938b3a355a | 6354:c0bd24801ac1 |
---|---|
66 // 2 - fragment continuation | 66 // 2 - fragment continuation |
67 // 3 - last fragmement | 67 // 3 - last fragmement |
68 frag = size <= max_pkt_size ? 0 : 1; | 68 frag = size <= max_pkt_size ? 0 : 1; |
69 | 69 |
70 if (!frag && !xdt) { // do we have a whole frame of raw data? | 70 if (!frag && !xdt) { // do we have a whole frame of raw data? |
71 unsigned end_ptr = (unsigned)s->buf + 6 + max_pkt_size; // what we're allowed to write | 71 uint8_t *end_ptr = s->buf + 6 + max_pkt_size; // what we're allowed to write |
72 unsigned ptr = (unsigned)s->buf_ptr + 2 + size; // what we're going to write | 72 uint8_t *ptr = s->buf_ptr + 2 + size; // what we're going to write |
73 int remaining = end_ptr - ptr; | 73 int remaining = end_ptr - ptr; |
74 | 74 |
75 if ((s->num_frames > 0 && remaining < 0) || | 75 if ((s->num_frames > 0 && remaining < 0) || |
76 s->num_frames >= s->max_frames_per_packet) { | 76 s->num_frames >= s->max_frames_per_packet) { |
77 // send previous packets now; no room for new data | 77 // send previous packets now; no room for new data |