| OLD | NEW |
| 1 /* Copyright (c) 2011 Xiph.Org Foundation | 1 /* Copyright (c) 2011 Xiph.Org Foundation |
| 2 Written by Jean-Marc Valin */ | 2 Written by Jean-Marc Valin */ |
| 3 /* | 3 /* |
| 4 Redistribution and use in source and binary forms, with or without | 4 Redistribution and use in source and binary forms, with or without |
| 5 modification, are permitted provided that the following conditions | 5 modification, are permitted provided that the following conditions |
| 6 are met: | 6 are met: |
| 7 | 7 |
| 8 - Redistributions of source code must retain the above copyright | 8 - Redistributions of source code must retain the above copyright |
| 9 notice, this list of conditions and the following disclaimer. | 9 notice, this list of conditions and the following disclaimer. |
| 10 | 10 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 | 91 |
| 92 int opus_repacketizer_get_nb_frames(OpusRepacketizer *rp) | 92 int opus_repacketizer_get_nb_frames(OpusRepacketizer *rp) |
| 93 { | 93 { |
| 94 return rp->nb_frames; | 94 return rp->nb_frames; |
| 95 } | 95 } |
| 96 | 96 |
| 97 opus_int32 opus_repacketizer_out_range_impl(OpusRepacketizer *rp, int begin, int
end, unsigned char *data, opus_int32 maxlen, int self_delimited) | 97 opus_int32 opus_repacketizer_out_range_impl(OpusRepacketizer *rp, int begin, int
end, unsigned char *data, opus_int32 maxlen, int self_delimited) |
| 98 { | 98 { |
| 99 int i, count; | 99 int i, count; |
| 100 opus_int32 tot_size; | 100 opus_int32 tot_size; |
| 101 short *len; | 101 opus_int16 *len; |
| 102 const unsigned char **frames; | 102 const unsigned char **frames; |
| 103 | 103 |
| 104 if (begin<0 || begin>=end || end>rp->nb_frames) | 104 if (begin<0 || begin>=end || end>rp->nb_frames) |
| 105 { | 105 { |
| 106 /*fprintf(stderr, "%d %d %d\n", begin, end, rp->nb_frames);*/ | 106 /*fprintf(stderr, "%d %d %d\n", begin, end, rp->nb_frames);*/ |
| 107 return OPUS_BAD_ARG; | 107 return OPUS_BAD_ARG; |
| 108 } | 108 } |
| 109 count = end-begin; | 109 count = end-begin; |
| 110 | 110 |
| 111 len = rp->len+begin; | 111 len = rp->len+begin; |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 { | 199 { |
| 200 return opus_repacketizer_out_range_impl(rp, begin, end, data, maxlen, 0); | 200 return opus_repacketizer_out_range_impl(rp, begin, end, data, maxlen, 0); |
| 201 } | 201 } |
| 202 | 202 |
| 203 opus_int32 opus_repacketizer_out(OpusRepacketizer *rp, unsigned char *data, opus
_int32 maxlen) | 203 opus_int32 opus_repacketizer_out(OpusRepacketizer *rp, unsigned char *data, opus
_int32 maxlen) |
| 204 { | 204 { |
| 205 return opus_repacketizer_out_range_impl(rp, 0, rp->nb_frames, data, maxlen, 0
); | 205 return opus_repacketizer_out_range_impl(rp, 0, rp->nb_frames, data, maxlen, 0
); |
| 206 } | 206 } |
| 207 | 207 |
| 208 | 208 |
| OLD | NEW |