Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
ccf0ee2c
Commit
ccf0ee2c
authored
16 years ago
by
Alexandre Savard
Browse files
Options
Downloads
Patches
Plain Diff
no maximum in rtp decode (#1143)
parent
259d3fc9
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
sflphone-common/src/audio/audiortp.cpp
+10
-10
10 additions, 10 deletions
sflphone-common/src/audio/audiortp.cpp
with
10 additions
and
10 deletions
sflphone-common/src/audio/audiortp.cpp
+
10
−
10
View file @
ccf0ee2c
...
@@ -465,13 +465,13 @@ AudioRtpRTX::receiveSessionForSpkr (int& countTime)
...
@@ -465,13 +465,13 @@ AudioRtpRTX::receiveSessionForSpkr (int& countTime)
// printf("AudioRtpRTX::receiveSessionForSpkr() Size of data from %i \n",size);
// printf("AudioRtpRTX::receiveSessionForSpkr() Size of data from %i \n",size);
// Decode data with relevant codec
// Decode data with relevant codec
unsigned
int
max
=
(
unsigned
int
)(
_codecSampleRate
*
_layerFrameSize
/
1000
);
//
unsigned int max = (unsigned int)(_codecSampleRate * _layerFrameSize / 1000);
if
(
size
>
max
)
{
//
if ( size > max ) {
_debug
(
"We have received from RTP a packet larger than expected: %d VS %d
\n
"
,
size
,
max
);
//
_debug("We have received from RTP a packet larger than expected: %d VS %d\n", size, max);
_debug
(
"The packet size has been cropped
\n
"
);
//
_debug("The packet size has been cropped\n");
size
=
max
;
//
size=max;
}
//
}
if
(
_audiocodec
!=
NULL
)
{
if
(
_audiocodec
!=
NULL
)
{
...
@@ -480,10 +480,10 @@ AudioRtpRTX::receiveSessionForSpkr (int& countTime)
...
@@ -480,10 +480,10 @@ AudioRtpRTX::receiveSessionForSpkr (int& countTime)
//buffer _receiveDataDecoded ----> short int or int16, coded on 2 bytes
//buffer _receiveDataDecoded ----> short int or int16, coded on 2 bytes
int
nbInt16
=
expandedSize
/
sizeof
(
int16
);
int
nbInt16
=
expandedSize
/
sizeof
(
int16
);
//nbInt16 represents the number of samples we just decoded
//nbInt16 represents the number of samples we just decoded
if
((
unsigned
int
)
nbInt16
>
max
)
{
//
if ((unsigned int)nbInt16 > max) {
_debug
(
"We have decoded an RTP packet larger than expected: %d VS %d. Cropping.
\n
"
,
nbInt16
,
max
);
//
_debug("We have decoded an RTP packet larger than expected: %d VS %d. Cropping.\n", nbInt16, max);
nbInt16
=
max
;
//
nbInt16=max;
}
//
}
int
nbSample
=
nbInt16
;
int
nbSample
=
nbInt16
;
if
(
_audiocodec
->
getClockRate
()
!=
_layerSampleRate
)
{
if
(
_audiocodec
->
getClockRate
()
!=
_layerSampleRate
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment