Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
97f5dd1d
Commit
97f5dd1d
authored
Oct 28, 2011
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
g726: don't pass index to g726_reset()
calculate it from c->code_size instead.
parent
615b2a2c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
g726.c
libavcodec/g726.c
+4
-4
No files found.
libavcodec/g726.c
View file @
97f5dd1d
...
@@ -270,11 +270,11 @@ static int16_t g726_decode(G726Context* c, int I)
...
@@ -270,11 +270,11 @@ static int16_t g726_decode(G726Context* c, int I)
return
av_clip
(
re_signal
<<
2
,
-
0xffff
,
0xffff
);
return
av_clip
(
re_signal
<<
2
,
-
0xffff
,
0xffff
);
}
}
static
av_cold
int
g726_reset
(
G726Context
*
c
,
int
index
)
static
av_cold
int
g726_reset
(
G726Context
*
c
)
{
{
int
i
;
int
i
;
c
->
tbls
=
G726Tables_pool
[
index
];
c
->
tbls
=
G726Tables_pool
[
c
->
code_size
-
2
];
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
2
;
i
++
)
{
c
->
sr
[
i
].
mant
=
1
<<
5
;
c
->
sr
[
i
].
mant
=
1
<<
5
;
c
->
pk
[
i
]
=
1
;
c
->
pk
[
i
]
=
1
;
...
@@ -327,7 +327,7 @@ static av_cold int g726_encode_init(AVCodecContext *avctx)
...
@@ -327,7 +327,7 @@ static av_cold int g726_encode_init(AVCodecContext *avctx)
avctx
->
bit_rate
=
c
->
code_size
*
avctx
->
sample_rate
;
avctx
->
bit_rate
=
c
->
code_size
*
avctx
->
sample_rate
;
avctx
->
bits_per_coded_sample
=
c
->
code_size
;
avctx
->
bits_per_coded_sample
=
c
->
code_size
;
g726_reset
(
c
,
c
->
code_size
-
2
);
g726_reset
(
c
);
avctx
->
coded_frame
=
avcodec_alloc_frame
();
avctx
->
coded_frame
=
avcodec_alloc_frame
();
if
(
!
avctx
->
coded_frame
)
if
(
!
avctx
->
coded_frame
)
...
@@ -423,7 +423,7 @@ static av_cold int g726_decode_init(AVCodecContext *avctx)
...
@@ -423,7 +423,7 @@ static av_cold int g726_decode_init(AVCodecContext *avctx)
av_log
(
avctx
,
AV_LOG_ERROR
,
"Invalid number of bits %d
\n
"
,
c
->
code_size
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"Invalid number of bits %d
\n
"
,
c
->
code_size
);
return
AVERROR
(
EINVAL
);
return
AVERROR
(
EINVAL
);
}
}
g726_reset
(
c
,
c
->
code_size
-
2
);
g726_reset
(
c
);
avctx
->
sample_fmt
=
AV_SAMPLE_FMT_S16
;
avctx
->
sample_fmt
=
AV_SAMPLE_FMT_S16
;
...
...
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