Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
9a6c8bbe
Unverified
Commit
9a6c8bbe
authored
Jun 10, 2021
by
Prabhat Roy
Committed by
GitHub
Jun 10, 2021
Browse files
Fixed typo in audio_sampler comments (#4028)
parent
d486ca7e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
torchvision/csrc/io/decoder/audio_sampler.cpp
torchvision/csrc/io/decoder/audio_sampler.cpp
+5
-5
No files found.
torchvision/csrc/io/decoder/audio_sampler.cpp
View file @
9a6c8bbe
...
...
@@ -65,7 +65,7 @@ bool AudioSampler::init(const SamplerParameters& params) {
int
result
;
if
((
result
=
swr_init
(
swrContext_
))
<
0
)
{
LOG
(
ERROR
)
<<
"swr_init fai
e
ld, err: "
<<
Util
::
generateErrorDesc
(
result
)
LOG
(
ERROR
)
<<
"swr_init fail
e
d, err: "
<<
Util
::
generateErrorDesc
(
result
)
<<
", in -> format: "
<<
params
.
in
.
audio
.
format
<<
", channels: "
<<
params
.
in
.
audio
.
channels
<<
", samples: "
<<
params
.
in
.
audio
.
samples
...
...
@@ -116,7 +116,7 @@ int AudioSampler::sample(
outNumSamples
,
inPlanes
,
inNumSamples
))
<
0
)
{
LOG
(
ERROR
)
<<
"swr_convert fai
e
ld, err: "
LOG
(
ERROR
)
<<
"swr_convert fail
e
d, err: "
<<
Util
::
generateErrorDesc
(
result
);
return
result
;
}
...
...
@@ -132,7 +132,7 @@ int AudioSampler::sample(
1
))
>=
0
)
{
out
->
append
(
result
);
}
else
{
LOG
(
ERROR
)
<<
"av_samples_get_buffer_size fai
e
ld, err: "
LOG
(
ERROR
)
<<
"av_samples_get_buffer_size fail
e
d, err: "
<<
Util
::
generateErrorDesc
(
result
);
}
}
...
...
@@ -140,7 +140,7 @@ int AudioSampler::sample(
// allocate a temporary buffer
auto
*
tmpBuffer
=
static_cast
<
uint8_t
*>
(
av_malloc
(
outBufferBytes
));
if
(
!
tmpBuffer
)
{
LOG
(
ERROR
)
<<
"av_alloc fai
e
ld, for size: "
<<
outBufferBytes
;
LOG
(
ERROR
)
<<
"av_alloc fail
e
d, for size: "
<<
outBufferBytes
;
return
-
1
;
}
...
...
@@ -158,7 +158,7 @@ int AudioSampler::sample(
outNumSamples
,
inPlanes
,
inNumSamples
))
<
0
)
{
LOG
(
ERROR
)
<<
"swr_convert fai
e
ld, err: "
LOG
(
ERROR
)
<<
"swr_convert fail
e
d, err: "
<<
Util
::
generateErrorDesc
(
result
);
av_free
(
tmpBuffer
);
return
result
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment