aacdec: Do not try to feed invalid buffers to libfaad
[paraslash.git] / ortp_recv.c
index 887b8e73d33d25f38a86cffef7229e059959dad4..905d580e1ba4dcf00872e40cf1119878e09794bb 100644 (file)
@@ -83,7 +83,7 @@ static int ortp_recv_pre_select(struct receiver_node *rn,
        return -1; /* we did not modify the fd sets */
 }
 
        return -1; /* we did not modify the fd sets */
 }
 
-static void compute_next_chunk(struct timeval *now, unsigned chunk_time,
+static void compute_next_chunk(unsigned chunk_time,
                struct private_ortp_recv_data *pord)
 {
        struct timeval chunk_tv = {0, chunk_time};
                struct private_ortp_recv_data *pord)
 {
        struct timeval chunk_tv = {0, chunk_time};
@@ -96,14 +96,10 @@ static void compute_next_chunk(struct timeval *now, unsigned chunk_time,
                pord->timestamp, pord->next_chunk.tv_sec,
                pord->next_chunk.tv_usec);
 }
                pord->timestamp, pord->next_chunk.tv_sec,
                pord->next_chunk.tv_usec);
 }
-/** \cond */
-#define BUF_TO_VAL(buf) (((unsigned)(buf)[1] & 0xff) +  256 \
-       * ((unsigned)(buf)[0] & 0xff))
-/** \endcond */
 
 
-
-static int ortp_recv_post_select(struct receiver_node *rn, int select_ret,
-       __a_unused fd_set *rfds, __a_unused fd_set *wfds)
+static int ortp_recv_post_select(struct receiver_node *rn,
+               __a_unused int select_ret, __a_unused fd_set *rfds,
+               __a_unused fd_set *wfds)
 {
        struct private_ortp_recv_data *pord = rn->private_data;
        mblk_t *mp;
 {
        struct private_ortp_recv_data *pord = rn->private_data;
        mblk_t *mp;
@@ -208,7 +204,7 @@ success:
                pord->c_bad = 0;
                pord->next_chunk = now;
        }
                pord->c_bad = 0;
                pord->next_chunk = now;
        }
-       compute_next_chunk(&now, chunk_time, pord);
+       compute_next_chunk(chunk_time, pord);
        return 1;
 err_out:
        freemsg(mp);
        return 1;
 err_out:
        freemsg(mp);